-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
phpstan.neon
68 lines (51 loc) · 2.96 KB
/
phpstan.neon
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
includes:
- vendor/contributte/phpstan/phpstan.neon
parameters:
level: 8
phpVersion: 80100
paths:
- src
- .docs
reportMaybesInPropertyPhpDocTypes: false
checkGenericClassInNonGenericObjectType: false
ignoreErrors:
# Intended property access - required for reflection
- '#^Variable property access on (\$this|static)\(Apitte\\Core\\Mapping\\(Request|Response)\\BasicEntity\)\.$#'
- '#^Variable property access on Apitte\\Core\\Mapping\\Request\\BasicEntity\.$#'
# Phpstan bug
- message: '#^Parameter \#1 \$argument of class ReflectionClass constructor expects class-string<T of object>|T of object, string given\.$#'
path: %currentWorkingDirectory%/src/Core/DI/Loader/DoctrineAnnotationLoader.php
# Missing strict comparison
- '#^Only booleans are allowed in#'
# Ignore bad php internal functions behavior
- message: '#^Method Apitte\\Core\\Annotation\\Controller\\OpenApi\:\:purifyDocblock\(\) should return string but returns string\|null\.$#'
path: %currentWorkingDirectory%/src/Core/Annotation/Controller/OpenApi.php
# Ignore unsage usage of new static()
- '#^Unsafe usage of new static\(\)\.$#'
# Allow empty()
- '#Construct empty\(\) is not allowed. Use more strict comparison.$#'
# ApiRoute optional flag
- '#Constructor of class Apitte\\Presenter\\ApiRoute has an unused parameter \$flags.$#'
# Ignore bad php behavior - should not happen
- message: '#\|false given\.$#'
path: %currentWorkingDirectory%/src/Debug/Tracy/BlueScreen/ValidationBlueScreen.php
# Ignore PHP soft-failing functions
- message: '#.+(int|string|string\>)\|false.+#'
path: %currentWorkingDirectory%/src/OpenApi/SchemaDefinition/Entity/EntityAdapter.php
# This should not happen because null is returned on error
- '#Method Apitte\\Core\\Utils\\Helpers::slashless\(\) should return string but returns string\|null\.#'
# To pass php8.0 tests where library doesn't have isSingle()
- message: """
#^Call to deprecated method isSingle\\(\\) of class Nette\\\\Utils\\\\Type\\:
use isSimple\\(\\)$#
"""
path: %currentWorkingDirectory%/src/OpenApi/SchemaDefinition/Entity/EntityAdapter.php
# Nette changed return typehint
- message: "#^Method Apitte\\\\OpenApi\\\\SchemaDefinition\\\\Entity\\\\EntityAdapter\\:\\:getNativePropertyType\\(\\) should return string but returns array\\<string\\>\\|string\\.$#"
path: %currentWorkingDirectory%/src/OpenApi/SchemaDefinition/Entity/EntityAdapter.php
# Nette changed return typehint
- message: "#^Parameter \\#2 \\$array of function implode expects array\\<string\\>, array\\<int, array\\<string\\>\\|string\\> given\\.$#"
path: %currentWorkingDirectory%/src/OpenApi/SchemaDefinition/Entity/EntityAdapter.php
# Support for doctrine/annotations ^1
- message: "#^Call to function method_exists\\(\\) with 'Doctrine\\\\\\\\Common\\\\\\\\Annotations\\\\\\\\AnnotationRegistry' and 'registerUniqueLoader' will always evaluate to false\\.$#"
path: src/Core/DI/LoaderFactory/DualReaderFactory.php