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