-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathphpstan.neon
45 lines (41 loc) · 1.65 KB
/
phpstan.neon
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
includes:
- ../../phpstan/phpstan-deprecation-rules/rules.neon
- ../../phpstan/phpstan-mockery/extension.neon
- ../../spaze/phpstan-disallowed-calls/extension.neon
parameters:
disallowedNamespaces:
- namespace: 'JetBrains\PhpStorm\*'
message: 'use native PHPDoc comments instead.'
disallowedMethodCalls:
- method: 'Pest\PendingObjects\TestCall::only()'
message: 'calls to Pest''s "only()" method should not be pushed to development.'
namespaceAndSuffix: []
worksome:
allRules: true
declareStrictTypes: %worksome.allRules%
disallowPhpunit: %worksome.allRules%
namespaceBasedSuffix: %worksome.allRules%
parametersSchema:
namespaceAndSuffix: arrayOf(string(), string())
worksome: structure([
allRules: anyOf(bool(), arrayOf(bool())),
declareStrictTypes: anyOf(bool(), arrayOf(bool())),
disallowPhpunit: anyOf(bool(), arrayOf(bool())),
namespaceBasedSuffix: anyOf(bool(), arrayOf(bool())),
])
services:
-
class: Worksome\CodingStyle\PHPStan\DisallowPHPUnitRule
-
class: Worksome\CodingStyle\PHPStan\DeclareStrictTypesRule
-
class: Worksome\CodingStyle\PHPStan\NamespaceBasedSuffixRule
arguments:
namespaceAndSuffix: %namespaceAndSuffix%
conditionalTags:
Worksome\CodingStyle\PHPStan\DeclareStrictTypesRule:
phpstan.rules.rule: %worksome.declareStrictTypes%
Worksome\CodingStyle\PHPStan\DisallowPHPUnitRule:
phpstan.rules.rule: %worksome.disallowPhpunit%
Worksome\CodingStyle\PHPStan\NamespaceBasedSuffixRule:
phpstan.rules.rule: %worksome.namespaceBasedSuffix%