src/Pug/Symfony/Traits/Options.php
Rename "$options" which has the same name as the field declared at line 22. Open
Open
$options = $this->getRendererOptions();
- 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
Property \Pug\Symfony\Traits\Options->pug
has undeclared type \Pug\Pug
Open
Open
* @property Pug|null $pug
- Exclude checks
Call to method hasOption
from undeclared class \Pug\Pug
Open
Open
return $pug->hasOption($name) ? $pug->getOption($name) : $default;
- Exclude checks
Return type of getRenderer()
is undeclared type \Pug\Pug
Open
Open
* @method Pug getRenderer()
- Exclude checks
Call to method setOptions
from undeclared class \Pug\Pug
Open
Open
$this->getRenderer()->setOptions($options);
- Exclude checks
Call to method getOption
from undeclared class \Pug\Pug
Open
Open
return $pug->hasOption($name) ? $pug->getOption($name) : $default;
- Exclude checks
Call to method setOption
from undeclared class \Pug\Pug
Open
Open
$this->getRenderer()->setOption($name, $value);
- Exclude checks