rector.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. declare(strict_types=1);
  3. use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
  4. use Rector\Config\RectorConfig;
  5. use Rector\Set\ValueObject\LevelSetList;
  6. use Rector\Set\ValueObject\SetList;
  7. return static function (RectorConfig $rectorConfig): void {
  8. $rectorConfig->paths([
  9. __DIR__ . '/accountancy',
  10. /* __DIR__ . '/adherents',
  11. __DIR__ . '/admin',
  12. __DIR__ . '/api',
  13. __DIR__ . '/asset',
  14. __DIR__ . '/asterisk',
  15. __DIR__ . '/barcode',
  16. __DIR__ . '/blockedlog',
  17. __DIR__ . '/bom',
  18. __DIR__ . '/bookcal',
  19. __DIR__ . '/bookmarks',
  20. __DIR__ . '/categories',
  21. __DIR__ . '/collab',
  22. __DIR__ . '/comm',
  23. __DIR__ . '/commande',
  24. __DIR__ . '/compta',
  25. __DIR__ . '/conf',
  26. __DIR__ . '/contact',
  27. __DIR__ . '/contrat',
  28. __DIR__ . '/core',
  29. __DIR__ . '/cron',
  30. __DIR__ . '/custom',
  31. __DIR__ . '/datapolicy',
  32. __DIR__ . '/dav',
  33. __DIR__ . '/debugbar',
  34. __DIR__ . '/delivery',
  35. __DIR__ . '/don',
  36. __DIR__ . '/ecm',
  37. __DIR__ . '/emailcollector',
  38. __DIR__ . '/eventorganization',
  39. __DIR__ . '/expedition',
  40. __DIR__ . '/expensereport',
  41. __DIR__ . '/exports',
  42. __DIR__ . '/externalsite',
  43. __DIR__ . '/fichinter',
  44. __DIR__ . '/fourn',
  45. __DIR__ . '/ftp',
  46. __DIR__ . '/holiday',
  47. __DIR__ . '/hrm',
  48. __DIR__ . '/imports',
  49. __DIR__ . '/install',
  50. __DIR__ . '/intracommreport',
  51. __DIR__ . '/knowledgemanagement',
  52. __DIR__ . '/loan',
  53. __DIR__ . '/mailmanspip',
  54. __DIR__ . '/margin',
  55. __DIR__ . '/mrp',
  56. __DIR__ . '/multicurrency',
  57. __DIR__ . '/opensurvey',
  58. __DIR__ . '/partnership',
  59. __DIR__ . '/paybox',
  60. __DIR__ . '/paypal',
  61. __DIR__ . '/printing',
  62. __DIR__ . '/product',
  63. __DIR__ . '/projet',
  64. __DIR__ . '/public',
  65. __DIR__ . '/reception',
  66. __DIR__ . '/recruitment',
  67. __DIR__ . '/resource',
  68. __DIR__ . '/salaries',
  69. __DIR__ . '/societe',
  70. __DIR__ . '/stripe',
  71. __DIR__ . '/supplier_proposal',
  72. __DIR__ . '/support',
  73. __DIR__ . '/takepos',
  74. __DIR__ . '/theme',
  75. __DIR__ . '/ticket',
  76. __DIR__ . '/user',
  77. __DIR__ . '/webhook',
  78. __DIR__ . '/webservices',
  79. __DIR__ . '/website',
  80. __DIR__ . '/workstation',
  81. __DIR__ . '/zapier',*/
  82. ]);
  83. // register a single rule
  84. $rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);
  85. // define sets of rules
  86. $rectorConfig->sets([
  87. //LevelSetList::UP_TO_PHP_81,
  88. SetList::CODE_QUALITY,
  89. SetList::CODING_STYLE,
  90. SetList::DEAD_CODE,
  91. SetList::EARLY_RETURN,
  92. SetList::NAMING
  93. ]);
  94. };