PHP code example of jadu / twig-style
1. Go to this page and download the library: Download jadu/twig-style library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jadu / twig-style example snippets
use Jadu\Style\Twig\Standard\JaduStandard;
use TwigCsFixer\Config\Config;
use TwigCsFixer\File\Finder;
use TwigCsFixer\Ruleset\Ruleset;
$finder = Finder::create()
->in(__DIR__ . '/src')
->ignoreVCSIgnored(true);
$config = new Config();
$config->setFinder($finder);
$ruleset = new Ruleset();
$ruleset->addStandard(new JaduStandard());
$config->setRuleset($ruleset);
return $config;
use Jadu\Style\Twig\Rule\Development\TokenTypeRule;
use TwigCsFixer\Config\Config;
use TwigCsFixer\File\Finder;
use TwigCsFixer\Ruleset\Ruleset;
$finder = Finder::create()
->in(__DIR__ . '/src')
->ignoreVCSIgnored(true);
$config = new Config();
$config->setFinder($finder);
$ruleset = new Ruleset();
$ruleset->addRule(new TokenTypeRule());
$config->setRuleset($ruleset);
$config->allowNonFixableRules();
return $config;