Skip to content

Commit c3503e6

Browse files
committed
fix
1 parent 713f0dc commit c3503e6

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

rules-tests/TypeDeclarationDocblocks/Rector/ClassMethod/DocblockReturnArrayFromDirectArrayInstanceRector/Fixture/false_and_true.php.inc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ function FalseAndTrue()
77
return [
88
'first' => [true],
99
'second' => [false],
10+
'third' => [true],
11+
'fourth' => [false],
1012
];
1113
}
1214

@@ -17,13 +19,15 @@ function FalseAndTrue()
1719
namespace Rector\Tests\TypeDeclarationDocblocks\Rector\ClassMethod\DocblockReturnArrayFromDirectArrayInstanceRector\Fixture;
1820

1921
/**
20-
* @return array<string, bool[]>
22+
* @return array<string, true[]|false[]>
2123
*/
2224
function FalseAndTrue()
2325
{
2426
return [
2527
'first' => [true],
2628
'second' => [false],
29+
'third' => [true],
30+
'fourth' => [false],
2731
];
2832
}
2933

src/NodeTypeResolver/PHPStan/TypeHasher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function createTypeHash(Type $type): string
3232
if ($type instanceof ArrayType) {
3333
return $this->createTypeHash($type->getIterableValueType()) . $this->createTypeHash(
3434
$type->getIterableKeyType()
35-
) . '[]';
35+
) . $type->getItemType()->describe(VerbosityLevel::precise()) . '[]';
3636
}
3737

3838
if ($type instanceof GenericObjectType) {

0 commit comments

Comments
 (0)