Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```php
- <?php
- $excluded_folders = [
- 'bootstrap',
- 'config',
- 'database',
- 'node_modules',
- 'public',
- 'resources',
- 'storage',
- 'vendor'
- ];
- $rules = [
- '@PSR1' => true,
- '@PSR2' => true,
- '@PhpCsFixer' => true,
- '@Symfony' => true,
- 'array_indentation' => true,
- 'array_syntax' => ['syntax' => 'short'],
- 'linebreak_after_opening_tag' => true,
- 'not_operator_with_successor_space' => true,
- 'no_short_echo_tag' => true,
- 'no_multiline_whitespace_before_semicolons' => true,
- 'no_unused_imports' => true,
- 'ordered_imports' => true,
- 'phpdoc_order' => true,
- ];
- $finder = PhpCsFixer\Finder::create()
- ->exclude($excluded_folders)
- ->notName('AcceptanceTester.php')
- ->notName('FunctionalTester.php')
- ->notName('UnitTester.php')
- ->notName('README.md')
- ->notName('*.xml')
- ->notName('*.yml')
- ->in(__DIR__)
- ;
- return PhpCsFixer\Config::create()
- ->setUsingCache(false)
- ->setRules($rules)
- ->setFinder($finder)
- ;
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement