File: phpstan.neon

package info (click to toggle)
php-nette-utils 4.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,480 kB
  • sloc: php: 4,219; xml: 9; makefile: 4
file content (109 lines) | stat: -rw-r--r-- 2,907 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
parameters:
	level: 6

	paths:
		- src
		- tests/types

	bootstrapFiles:
		- tests/phpstan-bootstrap.php

	excludePaths:
		- src/compatibility.php
		- src/Iterators/Mapper.php
		- src/Utils/ObjectHelpers.php

	ignoreErrors:
		# Intentional design pattern: new static() for inheritance support in fluent interfaces
		-
			identifier: new.static
			paths:
				- src/Utils/ArrayHash.php
				- src/Utils/ArrayList.php
				- src/Utils/DateTime.php
				- src/Utils/Finder.php
				- src/Utils/Html.php
				- src/Utils/Image.php

		# Runtime validation: ArrayAccess methods receive mixed types, validation is necessary
		-
			identifier: function.alreadyNarrowedType
			paths:
				- src/Utils/ArrayHash.php
				- src/Utils/ArrayList.php

		# Runtime validation: isList check validates input at runtime
		-
			identifier: staticMethod.alreadyNarrowedType
			path: src/Utils/ArrayList.php

		# Runtime validation: is_callable check validates callback at runtime
		-
			identifier: function.alreadyNarrowedType
			path: src/Utils/Strings.php

		# Intentional pattern: using && for short-circuit evaluation with side effects
		-
			identifier: booleanAnd.leftAlwaysTrue
			path: src/Utils/DateTime.php
			reportUnmatched: false

		# Intentional pattern: assignment in condition with && operator
		-
			identifier: booleanAnd.rightAlwaysTrue
			path: src/Utils/Reflection.php

		# PHP 8.3+: getBytesFromString() doesn't exist on PHP 8.2
		-
			identifier: method.notFound
			path: src/Utils/Random.php
			reportUnmatched: false

		# Intentional pattern: ??= for caching filter results, variable is declared via reference
		-
			identifier: nullCoalesce.variable
			path: src/Utils/Finder.php

		# Type test files: assertType() is the side effect, comparison warnings are expected
		-
			identifier: greater.alwaysTrue
			path: tests/types/utils-types.php

		# Image.php: Callback signature intentionally simplified (doesn't use int parameter)
		-
			identifier: argument.type
			path: src/Utils/Image.php
			count: 1

		# Image.php: Defensive validation even though phpDoc specifies positive-int
		-
			identifiers:
				- smaller.alwaysFalse
				- booleanOr.alwaysFalse
			path: src/Utils/Image.php

		# Image.php: isset() check for type safety even though offset always exists
		-
			identifier: isset.offset
			path: src/Utils/Image.php

		# Image.php: Match arms document all supported types
		-
			identifier: match.alwaysTrue
			path: src/Utils/Image.php

		# Image.php: Return type annotation conveys intent (ImageType constants are ints)
		-
			identifier: return.type
			path: src/Utils/Image.php
			count: 1

		# Image.php: By-ref parameter type narrowing in isPercent()
		-
			identifier: parameterByRef.type
			path: src/Utils/Image.php

		# Iterables.php: Anonymous classes can't properly resolve template types from enclosing method
		-
			identifier: argument.templateType
			path: src/Utils/Iterables.php