Skip to content

Commit fb9f3b6

Browse files
committed
Init passByRefFunctionsCache to null explicitly
1 parent 1fd2685 commit fb9f3b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

VariableAnalysis/Sniffs/CodeAnalysis/VariableAnalysisSniff.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ class VariableAnalysisSniff implements Sniff
156156
/**
157157
* A cache for getPassByReferenceFunctions
158158
*
159-
* @var array<array<int|string>>
159+
* @var array<array<int|string>>|null
160160
*/
161-
private $passByRefFunctionsCache;
161+
private $passByRefFunctionsCache = null;
162162

163163
public function __construct()
164164
{
@@ -211,7 +211,7 @@ private function getPassByReferenceFunction($functionName)
211211
*/
212212
private function getPassByReferenceFunctions()
213213
{
214-
if (isset($this->passByRefFunctionsCache)) {
214+
if (! is_null($this->passByRefFunctionsCache)) {
215215
return $this->passByRefFunctionsCache;
216216
}
217217
$passByRefFunctions = Constants::getPassByReferenceFunctions();

0 commit comments

Comments
 (0)