We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1fd2685 commit fb9f3b6Copy full SHA for fb9f3b6
VariableAnalysis/Sniffs/CodeAnalysis/VariableAnalysisSniff.php
@@ -156,9 +156,9 @@ class VariableAnalysisSniff implements Sniff
156
/**
157
* A cache for getPassByReferenceFunctions
158
*
159
- * @var array<array<int|string>>
+ * @var array<array<int|string>>|null
160
*/
161
- private $passByRefFunctionsCache;
+ private $passByRefFunctionsCache = null;
162
163
public function __construct()
164
{
@@ -211,7 +211,7 @@ private function getPassByReferenceFunction($functionName)
211
212
private function getPassByReferenceFunctions()
213
214
- if (isset($this->passByRefFunctionsCache)) {
+ if (! is_null($this->passByRefFunctionsCache)) {
215
return $this->passByRefFunctionsCache;
216
}
217
$passByRefFunctions = Constants::getPassByReferenceFunctions();
0 commit comments