-
Notifications
You must be signed in to change notification settings - Fork 3
/
larastan.neon
110 lines (106 loc) · 3.73 KB
/
larastan.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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
includes:
- ./phpstan.neon
- ../../larastan/larastan/extension.neon
parameters:
worksomeLaravel:
allRules: true
disallowEnvironmentChecks: %worksomeLaravel.allRules%
enforceKebabCaseArtisanCommands: %worksomeLaravel.allRules%
requireWithoutTimestamps: %worksomeLaravel.allRules%
namespaceAndSuffix:
App\Events: Event
App\Listener: Listener
App\Policies: Policy
App\Jobs: Job
disallowedMethodCalls:
-
method: 'Illuminate\Routing\Router::resource()'
message: 'usage of [resource] method for routes is disallowed. Please split the resource into multiple routes.'
-
method: 'Illuminate\Routing\Router::apiResource()'
message: 'usage of [apiResource] method for routes is disallowed. Please split the resource into multiple routes.'
ignoreErrors:
-
identifier: missingType.iterableValue
reportUnmatched: false
parametersSchema:
worksomeLaravel: structure([
allRules: anyOf(bool(), arrayOf(bool())),
disallowEnvironmentChecks: anyOf(bool(), arrayOf(bool())),
enforceKebabCaseArtisanCommands: anyOf(bool(), arrayOf(bool())),
requireWithoutTimestamps: anyOf(bool(), arrayOf(bool())),
])
services:
-
class: Worksome\CodingStyle\PHPStan\Laravel\DisallowEnvironmentCheck\DisallowEnvironmentCheckRule
-
class: Worksome\CodingStyle\PHPStan\Laravel\EnforceKebabCaseArtisanCommandsRule
-
class: Worksome\CodingStyle\PHPStan\Laravel\Migrations\RequireWithoutTimestampsRule
-
class: Vural\LarastanStrictRules\Rules\NoDynamicWhereRule
tags:
- phpstan.rules.rule
-
class: Vural\LarastanStrictRules\Rules\NoFacadeRule
tags:
- phpstan.rules.rule
-
class: Vural\LarastanStrictRules\Rules\NoValidationInControllerRule
tags:
- phpstan.rules.rule
-
class: Vural\LarastanStrictRules\Rules\ScopeShouldReturnQueryBuilderRule
tags:
- phpstan.rules.rule
-
class: Vural\LarastanStrictRules\Rules\NoPropertyAccessorRule
tags:
- phpstan.rules.rule
-
class: Vural\LarastanStrictRules\Rules\NoGlobalLaravelFunctionRule
arguments:
allowedFunctions:
- class_basename
- class_uses_recursive
- e
- env
- object_get
- preg_replace_array
- retry
- str
- tap
- throw_if
- throw_unless
- trait_uses_recursive
- with
- collect
- data_fill
- data_get
- data_set
- value
- config
- fake
- method_field
- now
- old
- redirect
- response
- route
- trans
- trans_choice
- __
- view
- url
- secure_url
- asset
- secure_asset
tags:
- phpstan.rules.rule
conditionalTags:
Worksome\CodingStyle\PHPStan\Laravel\DisallowEnvironmentCheck\DisallowEnvironmentCheckRule:
phpstan.rules.rule: %worksomeLaravel.disallowEnvironmentChecks%
Worksome\CodingStyle\PHPStan\Laravel\EnforceKebabCaseArtisanCommandsRule:
phpstan.rules.rule: %worksomeLaravel.enforceKebabCaseArtisanCommands%
Worksome\CodingStyle\PHPStan\Laravel\Migrations\RequireWithoutTimestampsRule:
phpstan.rules.rule: %worksomeLaravel.requireWithoutTimestamps%