forked from tlapnet/datus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon
20 lines (16 loc) · 1.4 KB
/
phpstan.neon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
parameters:
ignoreErrors:
# Safety check
- path: %currentWorkingDirectory%/src/Bridges/Nette/Form/AbstractFormBuilder.php
message: '#^Instanceof between Tlapnet\\Datus\\Schema\\FormInput and Tlapnet\\Datus\\Schema\\FormInput will always evaluate to true\.$#'
# Ignore globally native php functions which could return false when used incorrectly
- '#^Strict comparison using .+ between .+ and false will always evaluate to true\.$#'
# Intentional incompatibility
- '#^Parameter .+ of method .+Validator\:\:validate\(\) should be contravariant with parameter .+ of method Symfony\\Component\\Validator\\ConstraintValidatorInterface\:\:validate\(\)$#'
- '#^Array \(array\<callable\(Nette\\Forms\\Container\)\: void\>\) does not accept Closure\(Nette\\Application\\UI\\Form\)\: void\.$#'
# Seems safe by usage. Method should probably accept only string.
- path: %currentWorkingDirectory%/src/Utils/DateTimeTools.php
message: '#^Method Tlapnet\\Datus\\Utils\\DateTimeTools\:\:ensureFormat\(\) should return string but returns DateTimeInterface\|int\|string\.$#'
# Needs array<string, mixed> phpdoc syntax
- '#^Parameter \#1 \$name of method Nette\\Forms\\Controls\\BaseControl\:\:setHtmlAttribute\(\) expects string, int\|string given\.$#'
- '#^Parameter \#1 \$name of method Tlapnet\\Datus\\Bridges\\Nette\\Form\\Filter\\FilterBuilderContainer\:\:(has|get)\(\) expects string, int\|string given\.$#'