Skip to content

Commit c7489c1

Browse files
authored
Merge pull request #23 from kenjis/add-phpstan-strict-rules
chore: add phpstan-strict-rules
2 parents 62e67f8 + 82c695d commit c7489c1

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"require-dev": {
1919
"codeigniter4/devkit": "^1.0",
2020
"codeigniter4/framework": "^4.3",
21-
"predis/predis": "^2.0"
21+
"predis/predis": "^2.0",
22+
"phpstan/phpstan-strict-rules": "^1.5"
2223
},
2324
"minimum-stability": "dev",
2425
"prefer-stable": true,

phpstan.neon.dist

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ parameters:
88
- vendor/codeigniter4/framework/system/Test/bootstrap.php
99
excludePaths:
1010
ignoreErrors:
11+
-
12+
message: '#Call to method PHPUnit\\Framework\\Assert::assertInstanceOf\(\) with.#'
1113
-
1214
message: '#Call to deprecated function random_string\(\):#'
1315
paths:
@@ -33,3 +35,10 @@ parameters:
3335
- APP_NAMESPACE
3436
- CI_DEBUG
3537
- ENVIRONMENT
38+
strictRules:
39+
allRules: false
40+
disallowedLooseComparison: true
41+
booleansInConditions: true
42+
disallowedConstructs: true
43+
matchingInheritedMethodNames: true
44+

0 commit comments

Comments
 (0)