pug-php/pug-symfony

View on GitHub
src/Pug/Symfony/Traits/Options.php

Summary

Maintainability
A
0 mins
Test Coverage

Rename "$options" which has the same name as the field declared at line 22.
Open

            $options = $this->getRendererOptions();

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

Property \Pug\Symfony\Traits\Options->pug has undeclared type \Pug\Pug
Open

 * @property Pug|null $pug
Severity: Minor
Found in src/Pug/Symfony/Traits/Options.php by phan

Call to method hasOption from undeclared class \Pug\Pug
Open

        return $pug->hasOption($name) ? $pug->getOption($name) : $default;
Severity: Critical
Found in src/Pug/Symfony/Traits/Options.php by phan

Return type of getRenderer() is undeclared type \Pug\Pug
Open

 * @method Pug   getRenderer()
Severity: Minor
Found in src/Pug/Symfony/Traits/Options.php by phan

Call to method setOptions from undeclared class \Pug\Pug
Open

        $this->getRenderer()->setOptions($options);
Severity: Critical
Found in src/Pug/Symfony/Traits/Options.php by phan

Call to method getOption from undeclared class \Pug\Pug
Open

        return $pug->hasOption($name) ? $pug->getOption($name) : $default;
Severity: Critical
Found in src/Pug/Symfony/Traits/Options.php by phan

Call to method setOption from undeclared class \Pug\Pug
Open

        $this->getRenderer()->setOption($name, $value);
Severity: Critical
Found in src/Pug/Symfony/Traits/Options.php by phan

There are no issues that match your filters.

Category
Status