imanghafoori1/laravel-widgetize

View on GitHub
src/Utils/SlotRenderer.php

Summary

Maintainability
A
0 mins
Test Coverage

Rename "$slots" which has the same name as the field declared at line 15.
Open

        $slots = $this->slots;
Severity: Major
Found in src/Utils/SlotRenderer.php by sonar-php

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

There are no issues that match your filters.

Category
Status