Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. <?php
  2.  
  3. $projectPath = __DIR__ . '/src';
  4. if (!file_exists($projectPath)) {
  5. echo 'Source directory is missed or project path is invalid.';
  6. exit(1);
  7. }
  8.  
  9. return PhpCsFixer\Config::create()
  10. ->setRules([
  11. '@Symfony' => true,
  12. '@DoctrineAnnotation' => true,
  13. 'array_syntax' => ['syntax' => 'short'],
  14. 'doctrine_annotation_array_assignment' => ['operator' => ':'],
  15. 'ordered_class_elements' => [
  16. 'order' => [
  17. 'use_trait',
  18. 'constant_public',
  19. 'constant_protected',
  20. 'constant_private',
  21. 'property_public_static',
  22. 'property_protected_static',
  23. 'property_private_static',
  24. 'property_public',
  25. 'property_protected',
  26. 'property_private',
  27. 'construct',
  28. 'destruct',
  29. 'magic',
  30. 'phpunit',
  31. 'method_public_static',
  32. 'method_protected_static',
  33. 'method_private_static',
  34. 'method_public',
  35. 'method_protected',
  36. 'method_private',
  37. ],
  38. ],
  39. ])
  40. ->setFinder(
  41. PhpCsFixer\Finder::create()
  42. ->in($projectPath)
  43. ->exclude([
  44. 'Migrations',
  45. ])
  46. )
  47. ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement