forked from angeloskath/php-nlp-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rector.php
51 lines (48 loc) · 1.74 KB
/
rector.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;
use Rector\Visibility\Rector\ClassConst\ChangeConstantVisibilityRector;
use Rector\Naming\Rector\Foreach_\RenameForeachValueVariableToMatchExprVariableRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnNewRector;
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
use Rector\CodingStyle\Rector\FuncCall\StrictArraySearchRector;
use Rector\CodingStyle\Rector\String_\SymplifyQuoteEscapeRector;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
return RectorConfig::configure()
->withPaths([
__DIR__.'/src',
__DIR__.'/tests',
])
// uncomment to reach your current PHP version
->withPhpSets()
->withRules([
AddVoidReturnTypeWhereNoReturnRector::class,
ChangeConstantVisibilityRector::class,
RenameForeachValueVariableToMatchExprVariableRector::class,
ReturnTypeFromReturnNewRector::class,
CountArrayToEmptyArrayComparisonRector::class,
StrictArraySearchRector::class,
SymplifyQuoteEscapeRector::class,
DeclareStrictTypesRector::class,
])
->withSets([
PHPUnitSetList::PHPUNIT_110,
])
->withPhpSets()
->withPHPStanConfigs(['phpstan.neon'])
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
privatization: true,
naming: true,
instanceOf: true,
earlyReturn: true,
strictBooleans: true
)
->withSkip([
__DIR__ . '/tests/sentiment_maxent.php'
]);