This rule is deprecated, and will eventually be removed.

Why is this an issue?

Overriding or shadowing a variable declared in an outer scope can strongly impact the readability, and therefore the maintainability, of a piece of code. Further, it could lead maintainers to introduce bugs because they think they’re using one variable but are really using another.

class Foo {
  public $myField;

  public function doSomething() {
    $myField = 0; // Noncompliant
    ...
  }
}