SAREhub/EasyECA

View on GitHub

Showing 47 of 50 total issues

Avoid using static access to class '\SAREhub\Client\Processor\Processors' in method 'parse'.
Open

        $processor = Processors::multicast();

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

Avoid using static access to class '\SAREhub\Client\DI\Processor\ProcessorDefinitionHelper' in method 'wrapCallableFunction'.
Open

        return $function instanceof \Closure ? ProcessorDefinitionHelper::closureValue($function) : $function;

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

Avoid using static access to class '\SAREhub\EasyECA\Rule\Action\ActionDefinition' in method '__construct'.
Open

        $this->onPass = $onPass ?? ActionDefinition::createNopDefinition();

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

Avoid using static access to class '\SAREhub\Commons\Misc\ArrayHelper' in method 'groupRulesByEventType'.
Open

        return ArrayHelper::groupByKey($rules, "event");

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

Avoid using static access to class '\SAREhub\Client\Processor\Processors' in method 'create'.
Open

        $processor = Processors::multicast();

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

Expected 1 newline at end of file; 0 found
Open

}

Expected 1 newline at end of file; 0 found
Open

}
Severity
Category
Status
Source
Language