11parameters :
2- level : 5
2+ level : 6
33
44 paths :
55 - src
@@ -8,12 +8,102 @@ parameters:
88 bootstrapFiles :
99 - tests/phpstan-bootstrap.php
1010
11+ excludePaths :
12+ - src/compatibility.php
13+ - src/Iterators/Mapper.php
14+ - src/Utils/ObjectHelpers.php
15+
1116 ignoreErrors :
12- # PHPStan does not support dynamic by reference return used by Nette\Utils\Strings::pcre()
13- - ' #Undefined variable : \$m #'
17+ # Intentional design pattern: new static() for inheritance support in fluent interfaces
18+ -
19+ identifier : new.static
20+ paths :
21+ - src/Utils/ArrayHash.php
22+ - src/Utils/ArrayList.php
23+ - src/Utils/DateTime.php
24+ - src/Utils/Finder.php
25+ - src/Utils/Html.php
26+ - src/Utils/Image.php
27+
28+ # Runtime validation: ArrayAccess methods receive mixed types, validation is necessary
29+ -
30+ identifier : function.alreadyNarrowedType
31+ paths :
32+ - src/Utils/ArrayHash.php
33+ - src/Utils/ArrayList.php
34+
35+ # Runtime validation: isList check validates input at runtime
36+ -
37+ identifier : staticMethod.alreadyNarrowedType
38+ path : src/Utils/ArrayList.php
39+
40+ # Runtime validation: is_callable check validates callback at runtime
41+ -
42+ identifier : function.alreadyNarrowedType
43+ path : src/Utils/Strings.php
44+
45+ # Intentional pattern: using && for short-circuit evaluation with side effects
46+ -
47+ identifier : booleanAnd.leftAlwaysTrue
48+ path : src/Utils/DateTime.php
49+ reportUnmatched : false
50+
51+ # Intentional pattern: assignment in condition with && operator
52+ -
53+ identifier : booleanAnd.rightAlwaysTrue
54+ path : src/Utils/Reflection.php
55+
56+ # PHP 8.3+: getBytesFromString() doesn't exist on PHP 8.2
57+ -
58+ identifier : method.notFound
59+ path : src/Utils/Random.php
60+ reportUnmatched : false
61+
62+ # Intentional pattern: ??= for caching filter results, variable is declared via reference
63+ -
64+ identifier : nullCoalesce.variable
65+ path : src/Utils/Finder.php
66+
67+ # Type test files: assertType() is the side effect, comparison warnings are expected
68+ -
69+ identifier : greater.alwaysTrue
70+ path : tests/types/utils-types.php
71+
72+ # Image.php: Callback signature intentionally simplified (doesn't use int parameter)
73+ -
74+ identifier : argument.type
75+ path : src/Utils/Image.php
76+ count : 1
77+
78+ # Image.php: Defensive validation even though phpDoc specifies positive-int
79+ -
80+ identifiers :
81+ - smaller.alwaysFalse
82+ - booleanOr.alwaysFalse
83+ path : src/Utils/Image.php
84+
85+ # Image.php: isset() check for type safety even though offset always exists
86+ -
87+ identifier : isset.offset
88+ path : src/Utils/Image.php
89+
90+ # Image.php: Match arms document all supported types
91+ -
92+ identifier : match.alwaysTrue
93+ path : src/Utils/Image.php
94+
95+ # Image.php: Return type annotation conveys intent (ImageType constants are ints)
96+ -
97+ identifier : return.type
98+ path : src/Utils/Image.php
99+ count : 1
14100
15- # PHPStan does not support RecursiveIteratorIterator proxying unknown method calls to inner iterator
16- - '#RecursiveIteratorIterator::getSubPathName\ (\)#'
101+ # Image.php: By-ref parameter type narrowing in isPercent()
102+ -
103+ identifier : parameterByRef.type
104+ path : src/Utils/Image.php
17105
18- # static cannot be changed to maintain backward compatibility
19- - '#Unsafe usage of new static\ (\)#'
106+ # Iterables.php: Anonymous classes can't properly resolve template types from enclosing method
107+ -
108+ identifier : argument.templateType
109+ path : src/Utils/Iterables.php
0 commit comments