-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
81 lines (72 loc) · 3.29 KB
/
Copy pathphpstan.neon.dist
File metadata and controls
81 lines (72 loc) · 3.29 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
includes:
- ./vendor/larastan/larastan/extension.neon
- ./vendor/tpetry/laravel-postgresql-enhanced/phpstan-extension.neon
- ./phpstan-baseline.php
- ./vendor/pestphp/pest/extension.neon
- ./vendor/orrison/meliorstan/config/extension.neon
- ./vendor/canyongbs/common/phpstan-extension.neon
rules:
- Orrison\MeliorStan\Rules\BooleanGetMethodName\BooleanGetMethodNameRule
- Orrison\MeliorStan\Rules\CamelCaseMethodName\CamelCaseMethodNameRule
- Orrison\MeliorStan\Rules\CamelCaseParameterName\CamelCaseParameterNameRule
- Orrison\MeliorStan\Rules\CamelCasePropertyName\CamelCasePropertyNameRule
- Orrison\MeliorStan\Rules\CamelCaseVariableName\CamelCaseVariableNameRule
- Orrison\MeliorStan\Rules\ConstantNamingConventions\ConstantNamingConventionsRule
- Orrison\MeliorStan\Rules\MissingClosureParameterTypehint\MissingClosureParameterTypehintRule
- Orrison\MeliorStan\Rules\PascalCaseClassName\PascalCaseClassNameRule
- Orrison\MeliorStan\Rules\ShortMethodName\ShortMethodNameRule
- Orrison\MeliorStan\Rules\ShortVariable\ShortVariableRule
- Orrison\MeliorStan\Rules\Superglobals\SuperglobalsRule
- Orrison\MeliorStan\Rules\TraitConstantNamingConventions\TraitConstantNamingConventionsRule
- Orrison\MeliorStan\Rules\ForbidPestPhpOnly\ForbidPestPhpOnlyRule
parameters:
# This can be removed once we have fixed all errors in our baseline. But need to be here now, so we don't have to rebuild it in every new PR.
reportUnmatchedIgnoredErrors: false
paths:
- app/
- app-modules/
- database/
- tests/
- routes/
excludePaths:
- app-modules/*/vendor/*
- app-modules/*/tests/*
scanFiles:
- ./_ide_helper_models.php
# Level 9 is the highest level
level: 6
meliorstan:
boolean_get_method_name:
check_parameterized_methods: true
short_variable:
exceptions: [id,at,to,as]
short_method_name:
minimum_length: 2
camel_case_property_name:
ignored_when_in_classes_descendant_of: [Spatie\LaravelSettings\Settings]
ignoreErrors:
-
identifier: larastan.noEnvCallsOutsideOfConfig
path: app-modules/*/config/*
reportUnmatched: false
-
message: '#Call to method [a-zA-Z]*\(\) on an unknown class static\.#'
identifier: class.notFound
paths:
- tests/*
- app-modules/*/tests/*
-
message: '#Call to an undefined method Illuminate\\Testing\\TestResponse::[a-zA-Z]*\(\).#'
identifier: method.notFound
paths:
- tests/*
- app-modules/*/tests/*
-
message: '#Call to an undefined method Pest\\PendingCalls\\TestCall::expect\(\)#'
identifier: method.notFound
path: tests/Tenant/Unit/ArchTest.php
-
message: '#Anonymous function should return Illuminate\\Database\\Eloquent\\Builder<Illuminate\\Database\\Eloquent\\Model> but returns Illuminate\\Database\\Eloquent\\Builder<.+>#'
identifier: return.type
typeAliases:
ValidationRules: 'array<string, array<\Illuminate\Contracts\Validation\Rule|\Illuminate\Contracts\Validation\ValidationRule|string>|string>'