Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9832147

Browse files
NativeFunctionReflectionProvider - caching array no longer static
1 parent 2829175 commit 9832147

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/Reflection/SignatureMap/NativeFunctionReflectionProvider.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class NativeFunctionReflectionProvider
3131
{
3232

3333
/** @var NativeFunctionReflection[] */
34-
private staticarray $functionMap = [];
34+
private array $functionMap = [];
3535

3636
public function __construct(private SignatureMapProvider $signatureMapProvider, private Reflector $reflector, private FileTypeMapper $fileTypeMapper, private StubPhpDocProvider $stubPhpDocProvider)
3737
{
@@ -40,8 +40,8 @@ public function __construct(private SignatureMapProvider $signatureMapProvider,
4040
public function findFunctionReflection(string $functionName): ?NativeFunctionReflection
4141
{
4242
$lowerCasedFunctionName = strtolower($functionName);
43-
if (isset(self::$functionMap[$lowerCasedFunctionName])) {
44-
return self::$functionMap[$lowerCasedFunctionName];
43+
if (isset($this->functionMap[$lowerCasedFunctionName])) {
44+
return $this->functionMap[$lowerCasedFunctionName];
4545
}
4646

4747
if (!$this->signatureMapProvider->hasFunctionSignature($lowerCasedFunctionName)) {
@@ -155,7 +155,7 @@ public function findFunctionReflection(string $functionName): ?NativeFunctionRef
155155
$hasSideEffects,
156156
$isDeprecated,
157157
);
158-
self::$functionMap[$lowerCasedFunctionName] = $functionReflection;
158+
$this->functionMap[$lowerCasedFunctionName] = $functionReflection;
159159

160160
return $functionReflection;
161161
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /