Skip to content

Commit 2118a8b

Browse files
committed
use phpstan-strict-rules
1 parent de80e4a commit 2118a8b

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"phpstan/extension-installer": "^1.1",
5353
"phpstan/phpstan": "^1.6",
5454
"phpstan/phpstan-deprecation-rules": "^1.0",
55+
"phpstan/phpstan-strict-rules": "^1.3",
5556
"phpunit/phpunit": "^9.5.5"
5657
},
5758
"conflict": {

phpstan.neon.dist

+2-7
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,13 @@ parameters:
66
- vendor/
77

88
# some extra rules
9-
checkAlwaysTrueCheckTypeFunctionCall: true
10-
checkAlwaysTrueInstanceof: true
11-
checkAlwaysTrueStrictComparison: true
12-
checkExplicitMixedMissingReturn: true
13-
checkFunctionNameCase: true
149
# TODO checkMissingClosureNativeReturnTypehintRule: true
15-
reportMaybesInMethodSignatures: true
16-
reportStaticMethodSignatures: true
1710
checkTooWideReturnTypesInProtectedAndPublicMethods: true
1811
checkMissingIterableValueType: false # TODO
1912

2013
ignoreErrors:
14+
- '~^Only booleans are allowed in (\|\||&&|a negated boolean|an if condition|a ternary operator condition), .+ given( on the (left|right) side)?\.~'
15+
2116
-
2217
message: '~^Call to deprecated method getRawDataByTable\(\) of class Atk4\\Data\\Persistence\\Array_:~'
2318
path: '*'

0 commit comments

Comments
 (0)