Skip to content

Commit db63b2e

Browse files
Improved static analysis
1 parent 47f5f6a commit db63b2e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

phpstan.src.neon.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
parameters:
22
level: max
33
ignoreErrors:
4+
- '#Anonymous function should have native return typehint ".+".#'
5+
- '#Call to function is_string\(\) with string will always evaluate to true.#'
46
- '#Variable \$defaults might not be defined.#'
57
- '/^Parameter \#1 \$readers of class Dotenv\\Repository\\[a-zA-Z]*Repository[a-zA-Z]* constructor expects/'
68
- '/^Parameter \#2 \$writers of class Dotenv\\Repository\\[a-zA-Z]*Repository[a-zA-Z]* constructor expects/'
@@ -9,3 +11,4 @@ parameters:
911
- '#Parameter \#1 \$callable of method PhpOption\\Option<Dotenv\\Loader\\Value\|null>::map\(\) expects callable\(Dotenv\\Loader\\Value\|null\): mixed, Closure\(Dotenv\\Loader\\Value\): mixed given.#'
1012
- '#Parameter \#1 \$callable of method PhpOption\\Option<array\|null>::[a-z]+\(\) expects callable\(array\|null\): [a-z]+, Closure\(array\): mixed given.#'
1113
- '#Parameter \#1 \$name of method Dotenv\\Repository\\AbstractRepository::set\(\) expects string, string\|null given.#'
14+
- '#Parameter \#.+ of method Dotenv\\Repository\\AbstractRepository::offset.+ should be contravariant .+#'

vendor-bin/phpstan/composer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
22
"require": {
3-
"phpstan/phpstan": "^0.12.25"
3+
"phpstan/phpstan": "^0.12.25",
4+
"phpstan/extension-installer": "^1.0.4",
5+
"phpstan/phpstan-deprecation-rules": "^0.12.4",
6+
"phpstan/phpstan-strict-rules": "^0.12.2",
7+
"thecodingmachine/phpstan-strict-rules": "^0.12.0"
48
}
59
}

0 commit comments

Comments
 (0)