Skip to content

Commit

Permalink
Improved static analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Jun 7, 2020
1 parent 47f5f6a commit db63b2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions phpstan.src.neon.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
parameters:
level: max
ignoreErrors:
- '#Anonymous function should have native return typehint ".+".#'
- '#Call to function is_string\(\) with string will always evaluate to true.#'
- '#Variable \$defaults might not be defined.#'
- '/^Parameter \#1 \$readers of class Dotenv\\Repository\\[a-zA-Z]*Repository[a-zA-Z]* constructor expects/'
- '/^Parameter \#2 \$writers of class Dotenv\\Repository\\[a-zA-Z]*Repository[a-zA-Z]* constructor expects/'
Expand All @@ -9,3 +11,4 @@ parameters:
- '#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.#'
- '#Parameter \#1 \$callable of method PhpOption\\Option<array\|null>::[a-z]+\(\) expects callable\(array\|null\): [a-z]+, Closure\(array\): mixed given.#'
- '#Parameter \#1 \$name of method Dotenv\\Repository\\AbstractRepository::set\(\) expects string, string\|null given.#'
- '#Parameter \#.+ of method Dotenv\\Repository\\AbstractRepository::offset.+ should be contravariant .+#'
6 changes: 5 additions & 1 deletion vendor-bin/phpstan/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"require": {
"phpstan/phpstan": "^0.12.25"
"phpstan/phpstan": "^0.12.25",
"phpstan/extension-installer": "^1.0.4",
"phpstan/phpstan-deprecation-rules": "^0.12.4",
"phpstan/phpstan-strict-rules": "^0.12.2",
"thecodingmachine/phpstan-strict-rules": "^0.12.0"
}
}

0 comments on commit db63b2e

Please sign in to comment.