-
Notifications
You must be signed in to change notification settings - Fork 2
/
phpstan.neon.dist
48 lines (45 loc) · 2.33 KB
/
phpstan.neon.dist
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
# Alexander Tebiev - https://github.com/beeyev
includes:
- ./vendor/phpstan/phpstan/conf/bleedingEdge.neon
- ./vendor/phpstan/phpstan-strict-rules/rules.neon
- ./vendor/phpstan/phpstan-phpunit/extension.neon
- ./vendor/symplify/phpstan-rules/config/services/services.neon
rules:
# "*Test.php" file cannot be located outside "Tests" namespace
- Symplify\PHPStanRules\Rules\CheckTypehintCallerTypeRule
# Interface have suffix of "Interface", trait have "Trait" suffix exclusively
- Symplify\PHPStanRules\Rules\Explicit\ExplicitClassPrefixSuffixRule
# Array method calls [$this, "method"] are not allowed. Use explicit method instead to help PhpStorm, PHPStan and Rector understand your code
- Symplify\PHPStanRules\Rules\Complexity\ForbiddenArrayMethodCallRule
# Multiple class/interface/trait is not allowed in single file
- Symplify\PHPStanRules\Rules\ForbiddenMultipleClassLikeInOneFileRule
# Removing parent param type is forbidden
- Symplify\PHPStanRules\Rules\ForbiddenParamTypeRemovalRule
# Use explicit names over dynamic ones
- Symplify\PHPStanRules\Rules\NoDynamicNameRule
# Use local named constant instead of inline string for regex to explain meaning by constant name
- Symplify\PHPStanRules\Rules\NoInlineStringRegexRule
# Anonymous variable in a %s->...() method call can lead to false dead methods. Make sure the variable type is known
- Symplify\PHPStanRules\Rules\Explicit\NoMixedMethodCallerRule
# Anonymous variables in a "%s->..." property fetch can lead to false dead property. Make sure the variable type is known
- Symplify\PHPStanRules\Rules\Explicit\NoMixedPropertyFetcherRule
# Use explicit return value over magic &reference
- Symplify\PHPStanRules\Rules\NoReferenceRule
# Returning false in non return bool class method. Use null instead
- Symplify\PHPStanRules\Rules\NarrowType\NoReturnFalseInNonBoolClassMethodRule
# Change "%s()" method visibility to "%s" to respect parent method visibility.
- Symplify\PHPStanRules\Rules\PreventParentMethodVisibilityOverrideRule
# Constant "%s" must be uppercase
- Symplify\PHPStanRules\Rules\UppercaseConstantRule
# Use explicit methods over array access on object
- Symplify\PHPStanRules\Rules\NoArrayAccessOnObjectRule
parameters:
phpVersion: 70200
level: max
treatPhpDocTypesAsCertain: false
paths:
- ./src/
- ./tests/
- ./updater/
excludePaths:
- ./src/Adapters/Laravel/*