File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed
rules-tests/TypeDeclarationDocblocks/Rector/ClassMethod/DocblockReturnArrayFromDirectArrayInstanceRector/Fixture
src/NodeTypeResolver/PHPStan Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Rector \Tests \TypeDeclarationDocblocks \Rector \ClassMethod \DocblockReturnArrayFromDirectArrayInstanceRector \Fixture ;
4+
5+ function FalseAndTrue ()
6+ {
7+ return [
8+ 'first ' => [true ],
9+ 'second ' => [false ],
10+ 'third ' => [true ],
11+ 'fourth ' => [false ],
12+ ];
13+ }
14+
15+ ?>
16+ -----
17+ <?php
18+
19+ namespace Rector \Tests \TypeDeclarationDocblocks \Rector \ClassMethod \DocblockReturnArrayFromDirectArrayInstanceRector \Fixture ;
20+
21+ /**
22+ * @return array<string, true[]|false[]>
23+ */
24+ function FalseAndTrue ()
25+ {
26+ return [
27+ 'first ' => [true ],
28+ 'second ' => [false ],
29+ 'third ' => [true ],
30+ 'fourth ' => [false ],
31+ ];
32+ }
33+
34+ ?>
Original file line number Diff line number Diff 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) {
You can’t perform that action at this time.
0 commit comments