forked from phpDocumentor/Reflection
-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpstan.neon
42 lines (41 loc) · 2.68 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
parameters:
checkGenericClassInNonGenericObjectType: false
ignoreErrors:
- '#Method phpDocumentor\\Reflection\\File\\LocalFile::\md5\(\) should return string but returns string\|false\.#'
- '#Else branch is unreachable because ternary operator condition is always true\.#'
#
# all these $fqsen errors indicate the need for a decorator class around PhpParser\Node to hold the public $fqsen that Reflection is giving it)
#
# src/phpDocumentor/Reflection/NodeVisitor/ElementNameResolver.php
- '#Access to an undefined property PhpParser\\Node\\Stmt\\Class_\|PhpParser\\Node\\Stmt\\Interface_\|PhpParser\\Node\\Stmt\\Trait_::\$fqsen#'
- '#Access to an undefined property PhpParser\\Node\\Stmt\\Namespace_::\$fqsen\.#'
- '#Access to an undefined property PhpParser\\Node\\Stmt\\Interface_::\$fqsen\.#'
- '#Access to an undefined property PhpParser\\Node\\Stmt\\Function_::\$fqsen\.#'
- '#Access to an undefined property PhpParser\\Node\\Stmt\\ClassMethod::\$fqsen\.#'
- '#Access to an undefined property PhpParser\\Node\\Const_::\$fqsen\.#'
- '#Access to an undefined property PhpParser\\Node\\Stmt\\PropertyProperty::\$fqsen\.#'
#
# src/phpDocumentor/Reflection/Php/Factory/Argument.php
- '#Access to an undefined property PhpParser\\Node\\Expr\\Error\|PhpParser\\Node\\Expr\\Variable::\$name\.#'
#
# src/phpDocumentor/Reflection/Php/Factory/Class_.php
- '#Access to an undefined property PhpParser\\Node\\Stmt\\Class_::\$fqsen\.#'
#
# src/phpDocumentor/Reflection/Php/Factory/Trait_.php
- '#Access to an undefined property PhpParser\\Node\\Stmt\\Trait_::\$fqsen\.#'
#
#
# this is a mismatch inside php-parser, not reflection
- '#Parameter \#1 \$nodes of method PhpParser\\NodeTraverser::traverse\(\) expects array\<PhpParser\\Node>, array\<PhpParser\\Node\\Stmt\>|null given\.#'
#
#
# there is one test case that prevents changing PropertyIterator::getDefault() to just return Expr (this is set in PhpParser)
# src/phpDocumentor/Reflection/Php/Factory/Property.php
- '#Parameter \#1 \$node of method PhpParser\\PrettyPrinterAbstract::prettyPrintExpr\(\) expects PhpParser\\Node\\Expr, PhpParser\\Node\\Expr\|string given\.#'
#
# Type hint in php-parser is incorrect.
- '#Cannot cast PhpParser\\Node\\Expr\|string to string.#'
#
# until I can make $object arg ?$object...
# src/phpDocumentor/Reflection/Php/Factory/DocBlock.php
- '#Strict comparison using === between PhpParser\\Comment\\Doc and null will always evaluate to false\.#'