Skip to content

Commit 945334f

Browse files
committed
more precise types
1 parent cadc2ef commit 945334f

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/Reflection/BetterReflection/SourceLocator/CachingVisitor.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ final class CachingVisitor extends NodeVisitorAbstract
2020

2121
private string $contents;
2222

23-
/** @var array<string, array<FetchedNode<Node\Stmt\ClassLike>>> */
23+
/** @var array<string, list<FetchedNode<Node\Stmt\ClassLike>>> */
2424
private array $classNodes;
2525

26-
/** @var array<string, array<FetchedNode<Node\Stmt\Function_>>> */
26+
/** @var array<string, list<FetchedNode<Node\Stmt\Function_>>> */
2727
private array $functionNodes;
2828

29-
/** @var array<string, array<FetchedNode<Node\Stmt\Const_|Node\Expr\FuncCall>>> */
29+
/** @var array<string, list<FetchedNode<Node\Stmt\Const_|Node\Expr\FuncCall>>> */
3030
private array $constantNodes;
3131

3232
private ?Node\Stmt\Namespace_ $currentNamespaceNode = null;
@@ -124,23 +124,23 @@ public function leaveNode(Node $node)
124124
}
125125

126126
/**
127-
* @return array<string, array<FetchedNode<Node\Stmt\ClassLike>>>
127+
* @return array<string, list<FetchedNode<Node\Stmt\ClassLike>>>
128128
*/
129129
public function getClassNodes(): array
130130
{
131131
return $this->classNodes;
132132
}
133133

134134
/**
135-
* @return array<string, array<FetchedNode<Node\Stmt\Function_>>>
135+
* @return array<string, list<FetchedNode<Node\Stmt\Function_>>>
136136
*/
137137
public function getFunctionNodes(): array
138138
{
139139
return $this->functionNodes;
140140
}
141141

142142
/**
143-
* @return array<string, array<FetchedNode<Node\Stmt\Const_|Node\Expr\FuncCall>>>
143+
* @return array<string, list<FetchedNode<Node\Stmt\Const_|Node\Expr\FuncCall>>>
144144
*/
145145
public function getConstantNodes(): array
146146
{

src/Reflection/BetterReflection/SourceLocator/FetchedNodesResult.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ final class FetchedNodesResult
88
{
99

1010
/**
11-
* @param array<string, array<FetchedNode<Node\Stmt\ClassLike>>> $classNodes
12-
* @param array<string, array<FetchedNode<Node\Stmt\Function_>>> $functionNodes
13-
* @param array<string, array<FetchedNode<Node\Stmt\Const_|Node\Expr\FuncCall>>> $constantNodes
11+
* @param array<string, list<FetchedNode<Node\Stmt\ClassLike>>> $classNodes
12+
* @param array<string, list<FetchedNode<Node\Stmt\Function_>>> $functionNodes
13+
* @param array<string, list<FetchedNode<Node\Stmt\Const_|Node\Expr\FuncCall>>> $constantNodes
1414
*/
1515
public function __construct(
1616
private array $classNodes,
@@ -21,23 +21,23 @@ public function __construct(
2121
}
2222

2323
/**
24-
* @return array<string, array<FetchedNode<Node\Stmt\ClassLike>>>
24+
* @return array<string, list<FetchedNode<Node\Stmt\ClassLike>>>
2525
*/
2626
public function getClassNodes(): array
2727
{
2828
return $this->classNodes;
2929
}
3030

3131
/**
32-
* @return array<string, array<FetchedNode<Node\Stmt\Function_>>>
32+
* @return array<string, list<FetchedNode<Node\Stmt\Function_>>>
3333
*/
3434
public function getFunctionNodes(): array
3535
{
3636
return $this->functionNodes;
3737
}
3838

3939
/**
40-
* @return array<string, array<FetchedNode<Node\Stmt\Const_|Node\Expr\FuncCall>>>
40+
* @return array<string, list<FetchedNode<Node\Stmt\Const_|Node\Expr\FuncCall>>>
4141
*/
4242
public function getConstantNodes(): array
4343
{

src/Reflection/SignatureMap/Php8SignatureMapProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private function findClassStubs(string $className): void
9797

9898
if (
9999
isset($this->methodNodes[$lowerClassName])
100-
|| isset($this->constantTypes[$lowerClassName])
100+
|| isset($this->constantTypes[$lowerClassName])
101101
) {
102102
return;
103103
}

0 commit comments

Comments
 (0)