Skip to content

Commit bd0b1c2

Browse files
committed
fixing phpstan
1 parent f1fc769 commit bd0b1c2

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

phpstan.neon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,7 @@ parameters:
7171
-
7272
identifier: phpstanApi.instanceofAssumption
7373

74+
-
75+
identifier: phpstanApi.varTagAssumption
76+
7477
- '#Asking about instanceof PHPStan\\.* is not covered by backward compatibility promise#'

rules/DowngradePhp80/Reflection/DefaultParameterValueResolver.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
namespace Rector\DowngradePhp80\Reflection;
66

7+
use PHPStan\Type\Constant\ConstantStringType;
8+
use PHPStan\Type\Constant\ConstantIntegerType;
9+
use PHPStan\Type\NullType;
710
use PhpParser\BuilderHelpers;
811
use PhpParser\Node\Expr;
912
use PhpParser\Node\Expr\ConstFetch;
@@ -50,6 +53,7 @@ private function resolveValueFromType(Type $constantType): ConstFetch | Expr
5053
return BuilderHelpers::normalizeValue($values);
5154
}
5255

56+
/** @var ConstantStringType|ConstantIntegerType|NullType $constantType */
5357
return BuilderHelpers::normalizeValue($constantType->getValue());
5458
}
5559

rules/DowngradePhp81/NodeFactory/ArrayMergeFromArraySpreadFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private function createArrayMergeFuncCall(array $arrayItems, MutatingScope $muta
9191
}
9292

9393
/**
94-
* @param array<(ArrayItem | null)> $items
94+
* @param array<ArrayItem> $items
9595
*/
9696
private function createArrayItemFromArray(array $items): ArrayItem
9797
{

0 commit comments

Comments
 (0)