src/Debug/Framework/Yii2/LogUser.php
Rename "$debug" which has the same name as the field declared at line 30. Open
Open
$debug = $this->debug->rootInstance->getChannel('User');
- Read upRead up
- Exclude checks
Shadowing fields with a local variable is a bad practice that reduces code readability: it makes it confusing to know whether the field or the variable is being used.
Noncompliant Code Example
class Foo { public $myField; public function doSomething() { $myField = 0; ... } }
See
- CERT, DCL51-J. - Do not shadow or obscure identifiers in subscopes