Skip to content

Commit 6c2027d

Browse files
committed
allow higher PHPStan
1 parent fc0c643 commit 6c2027d

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

phpstan.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,3 +542,5 @@ parameters:
542542
- '#Method Rector\\Testing\\Finder\\RectorsFinder\:\:findClassesInDirectoriesByName\(\) should return array<class\-string\> but returns array<int, \(int\|string\)\>#'
543543
- '#Content of method "collectVariableFromAssign\(\)" is duplicated with method "collectVariableFromAssign\(\)" in "Rector\\NetteToSymfony\\NodeAnalyzer\\ClassMethodRenderAnalyzer" class\. Use unique content or abstract service instead#'
544544
- '#Property PhpParser\\Node\\Param\:\:\$type \(PhpParser\\Node\\Identifier\|PhpParser\\Node\\Name\|PhpParser\\Node\\NullableType\|PhpParser\\Node\\UnionType\|null\) does not accept PhpParser\\Node#'
545+
- '#Binary operation "\." between array\|string\|false and (.*?) results in an error#'
546+
- '#Parameter \#3 \.\.\.\$rest of function array_uintersect expects array, Closure\(PhpParser\\Node\\Param, PhpParser\\Node\\Param\)\: int given#'

rules/type-declaration/src/Rector/ClassMethod/ParamTypeFromStrictTypedPropertyRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private function matchPropertySingleTypeNode(PropertyFetch $propertyFetch): ?Nod
147147
if (! $property instanceof Property) {
148148
// code from /vendor
149149
$propertyFetchType = $this->reflectionTypeResolver->resolvePropertyFetchType($propertyFetch);
150-
if ($propertyFetchType === null) {
150+
if (! $propertyFetchType instanceof Type) {
151151
return null;
152152
}
153153

0 commit comments

Comments
 (0)