-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrules.neon
More file actions
20 lines (20 loc) · 837 Bytes
/
rules.neon
File metadata and controls
20 lines (20 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
rules:
# TODO gradually enable those rules
#- MLL\Utils\PHPStan\Rules\ThrowableClassNameRule
#- MLL\Utils\PHPStan\Rules\VariableNameIdToIDRule
#- MLL\Utils\PHPStan\Rules\PropertyNameIdToIDRule
#- MLL\Utils\PHPStan\Rules\MissingClosureParameterTypehintRule
parameters:
# https://github.com/spaze/phpstan-disallowed-calls/blob/main/docs/custom-rules.md
disallowedFunctionCalls:
- function: 'compact()'
message: 'makes refactoring code hard.'
errorTip: 'use standard array syntax instead.'
# https://github.com/itsgoingd/clockwork?tab=readme-ov-file#logging
- function: 'clock()'
message: 'it is just meant for debugging.'
errorTip: 'remove debugging code.'
disallowedStaticCalls:
- method: 'Carbon\Carbon::create()'
message: 'it ignores errors.'
errorTip: 'use Carbon\Carbon::createStrict() instead.'