This repository was archived by the owner on Dec 9, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathphpstan.neon
More file actions
47 lines (39 loc) · 2.93 KB
/
phpstan.neon
File metadata and controls
47 lines (39 loc) · 2.93 KB
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
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:
# @todo
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\.$#'
# There is no apitte/negotiation dependency
- '#^Return typehint of method Apitte\\Core\\Http\\ApiResponse::getEntity\(\) has invalid type Apitte\\Negotiation\\Http\\AbstractEntity\.$#'
- '#^Parameter \$entity of method Apitte\\Core\\Http\\ApiResponse::withEntity\(\) has invalid typehint type Apitte\\Negotiation\\Http\\AbstractEntity\.$#'
- '#^Call to static method from\(\) on an unknown class Apitte\\Negotiation\\Http\\#'
# Phpstan bug
- '#^Parameter \#1 (.*?) of function call_user_func expects callable\(\)\: mixed, array\(Apitte\\Core\\UI\\Controller\\IController, string\) given\.$#'
- message: '#^Parameter \#1 \$argument of class ReflectionClass constructor expects class-string<T of object>|T of object, string given\.$#'
path: %currentWorkingDirectory%/src/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/Annotation/Controller/OpenApi.php
- message: '#^Return type \(iterable&Traversable\) of method Apitte\\Core\\Mapping\\Request\\AbstractEntity\:\:getIterator\(\) should be covariant with return type \(Traversable<mixed, mixed>\) of method IteratorAggregate<mixed,mixed>\:\:getIterator\(\)$#'
path: %currentWorkingDirectory%/src/Mapping/Request/AbstractEntity.php
- message: '#^Return type \(iterable&Traversable\) of method Apitte\\Core\\Mapping\\Response\\AbstractEntity\:\:getIterator\(\) should be covariant with return type \(Traversable<mixed, mixed>\) of method IteratorAggregate<mixed,mixed>\:\:getIterator\(\)$#'
path: %currentWorkingDirectory%/src/Mapping/Response/AbstractEntity.php
# Ignore unsage usage of new static()
- message: '#^Unsafe usage of new static\(\)\.$#'
paths:
- %currentWorkingDirectory%/src/Exception/ExceptionExtra.php
- %currentWorkingDirectory%/src/Mapping/Request/BasicEntity.php
# Allow empty()
- '#Construct empty\(\) is not allowed. Use more strict comparison.$#'