-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.twig-cs-fixer.php
More file actions
27 lines (20 loc) · 686 Bytes
/
Copy path.twig-cs-fixer.php
File metadata and controls
27 lines (20 loc) · 686 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
declare(strict_types=1);
use Ruudk\GraphQLCodeGenerator\Twig\GraphQLFormatterRule;
use Ruudk\GraphQLCodeGenerator\Twig\GraphQLTokenParser;
use TwigCsFixer\Config\Config;
use TwigCsFixer\File\Finder;
use TwigCsFixer\Ruleset\Ruleset;
use TwigCsFixer\Standard\TwigCsFixer;
$ruleset = new Ruleset();
$ruleset->addStandard(new TwigCsFixer());
$ruleset->addRule(new GraphQLFormatterRule());
$finder = Finder::create()
->in('tests');
$config = new Config();
$config->allowNonFixableRules();
$config->setCacheFile(__DIR__ . '/.twig-cs-fixer.cache');
$config->setRuleset($ruleset);
$config->setFinder($finder);
$config->addTokenParser(new GraphQLTokenParser());
return $config;