forked from contributte/apitte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan.neon
55 lines (41 loc) · 2.24 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
includes:
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
- vendor/phpstan/phpstan-nette/extension.neon
- vendor/phpstan/phpstan-nette/rules.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon
parameters:
level: 8
phpVersion: 80100
paths:
- src
- .docs
reportMaybesInPropertyPhpDocTypes: false
checkGenericClassInNonGenericObjectType: false
ignoreErrors:
# deprecated with no replacement until 2.0.0
- '#^Call to deprecated method registerUniqueLoader\(\) of class Doctrine\\Common\\Annotations\\AnnotationRegistry.+#'
# 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
- '#^Parameter \#1 \$haystack of static method Nette\\Utils\\Strings\:\:contains\(\) expects string, string\|false given\.$#'
- 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.$#'
# 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
- '#Unable to resolve the template type T in call to method Nette\\DI\\Container::getByType\(\)#'
- '#Property Apitte\\OpenApi\\Schema\\(\w+)::\$(\w+) is never read, only written.#'
- '#Property Apitte\\OpenApi\\Schema\\(\w+)::\$(\w+) is unused.#'