Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. ```php
  2. <?php
  3. $excluded_folders = [
  4. 'bootstrap',
  5. 'config',
  6. 'database',
  7. 'node_modules',
  8. 'public',
  9. 'resources',
  10. 'storage',
  11. 'vendor'
  12. ];
  13.  
  14. $rules = [
  15. '@PSR1' => true,
  16. '@PSR2' => true,
  17. '@PhpCsFixer' => true,
  18. '@Symfony' => true,
  19. 'array_indentation' => true,
  20. 'array_syntax' => ['syntax' => 'short'],
  21. 'linebreak_after_opening_tag' => true,
  22. 'not_operator_with_successor_space' => true,
  23. 'no_short_echo_tag' => true,
  24. 'no_multiline_whitespace_before_semicolons' => true,
  25. 'no_unused_imports' => true,
  26. 'ordered_imports' => true,
  27. 'phpdoc_order' => true,
  28. ];
  29.  
  30. $finder = PhpCsFixer\Finder::create()
  31. ->exclude($excluded_folders)
  32. ->notName('AcceptanceTester.php')
  33. ->notName('FunctionalTester.php')
  34. ->notName('UnitTester.php')
  35. ->notName('README.md')
  36. ->notName('*.xml')
  37. ->notName('*.yml')
  38. ->in(__DIR__)
  39. ;
  40.  
  41. return PhpCsFixer\Config::create()
  42. ->setUsingCache(false)
  43. ->setRules($rules)
  44. ->setFinder($finder)
  45. ;
  46.  
  47. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement