Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 48 lines (47 sloc) 1.477 kb
24cb9e6 Matthew Weier O'Phinney [#3273] Added PHP-CS-Fixer rules
weierophinney authored
1 <?php
2 $finder = Symfony\CS\Finder\DefaultFinder::create()
adae579 Matthew Weier O'Phinney Ignore some files/paths when running CS checks
weierophinney authored
3 ->notPath('Zend/View/Stream.php')
f9cbe3a Maks3w [cs-fixer] Centralize configuration in a single file
Maks3w authored
4 ->notPath('ZendTest/Code/Generator/TestAsset')
5823a47 Maks3w [cs-fixer] Fix files to lookup
Maks3w authored
5 ->notPath('ZendTest/Code/Reflection/FunctionReflectionTest.php')
6 ->notPath('ZendTest/Code/Reflection/MethodReflectionTest.php')
f9cbe3a Maks3w [cs-fixer] Centralize configuration in a single file
Maks3w authored
7 ->notPath('ZendTest/Code/Reflection/TestAsset')
5823a47 Maks3w [cs-fixer] Fix files to lookup
Maks3w authored
8 ->notPath('ZendTest/Code/TestAsset')
9 ->notPath('ZendTest/Validator/_files')
10 ->notPath('ZendTest/Loader/_files')
11 ->notPath('ZendTest/Loader/TestAsset')
83615b6 Matthew Weier O'Phinney Re-instated two notPath() rules
weierophinney authored
12 ->notPath('demos')
13 ->notPath('resources')
f3d3566 Matthew Weier O'Phinney Updated php-cs-fixer rules
weierophinney authored
14 // Following are necessary when you use `parallel` or specify a path
15 // from the project root.
16 ->notPath('Stream.php')
17 ->notPath('Generator/TestAsset')
18 ->notPath('Reflection/FunctionReflectionTest.php')
19 ->notPath('Reflection/MethodReflectionTest.php')
20 ->notPath('Reflection/TestAsset')
21 ->notPath('TestAsset')
22 ->notPath('_files')
834d631 Matthew Weier O'Phinney [#3684] Polyfill support for version-dependent classes
weierophinney authored
23 ->filter(function (SplFileInfo $file) {
24 if (strstr($file->getPath(), 'compatibility')) {
25 return false;
26 }
5c60599 Matthew Weier O'Phinney Allow running php-cs-fixer in parallel
weierophinney authored
27 });
834d631 Matthew Weier O'Phinney [#3684] Polyfill support for version-dependent classes
weierophinney authored
28 $config = Symfony\CS\Config\Config::create();
65b93ac Filippo Tessarotto PHP-CS-Fixer: restrict level to specified fixers
Slamdunk authored
29 $config->level(null);
f9cbe3a Maks3w [cs-fixer] Centralize configuration in a single file
Maks3w authored
30 $config->fixers(
31 array(
32 'indentation',
33 'linefeed',
34 'trailing_spaces',
35 'short_tag',
36 'visibility',
37 'php_closing_tag',
38 'braces',
39 'function_declaration',
40 'psr0',
41 'elseif',
42 'eof_ending',
43 'unused_use',
44 )
45 );
834d631 Matthew Weier O'Phinney [#3684] Polyfill support for version-dependent classes
weierophinney authored
46 $config->finder($finder);
47 return $config;
Something went wrong with that request. Please try again.