pug-php/pug-filter-sbp

View on GitHub

Showing 3 of 3 total issues

Avoid using static access to class '\Sbp\Sbp' in method 'parse'.
Open

        $php = SbpParser::parse($sbp);
Severity: Minor
Found in src/Pug/Filter/Sbp.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Call to method parse from undeclared class \Sbp\Sbp (Did you mean class \Pug\Filter\Sbp)
Open

        $php = SbpParser::parse($sbp);
Severity: Critical
Found in src/Pug/Filter/Sbp.php by phan

Class extends undeclared class \Pug\Filter\AbstractFilter
Open

class Sbp extends AbstractFilter
Severity: Critical
Found in src/Pug/Filter/Sbp.php by phan
Severity
Category
Status
Source
Language