SAREhub/EasyECA

View on GitHub

Showing 47 of 50 total issues

Avoid excessively long class names like DefaultEventTypeRuleGroupsSplittingStrategy. Keep class name length under 40.
Open

class DefaultEventTypeRuleGroupsSplittingStrategy implements SplittingStrategy
{
    /**
     * @var EventRuleGroupDefinitionFactory
     */

LongClassName

Since: 2.9

Detects when classes or interfaces are declared with excessively long names.

Example

class ATooLongClassNameThatHintsAtADesignProblem {

}

interface ATooLongInterfaceNameThatHintsAtADesignProblem {

}

Source https://phpmd.org/rules/naming.html#longclassname

The class RuleDefinitions has a coupling between objects value of 13. Consider to reduce the number of dependencies under 13.
Open

class RuleDefinitions
{
    public static function get(): array
    {
        return [

CouplingBetweenObjects

Since: 1.1.0

A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

Example

class Foo {
    /**
     * @var \foo\bar\X
     */
    private $x = null;

    /**
     * @var \foo\bar\Y
     */
    private $y = null;

    /**
     * @var \foo\bar\Z
     */
    private $z = null;

    public function setFoo(\Foo $foo) {}
    public function setBar(\Bar $bar) {}
    public function setBaz(\Baz $baz) {}

    /**
     * @return \SplObjectStorage
     * @throws \OutOfRangeException
     * @throws \InvalidArgumentException
     * @throws \ErrorException
     */
    public function process(\Iterator $it) {}

    // ...
}

Source https://phpmd.org/rules/design.html#couplingbetweenobjects

The class RuleDefinitions has a coupling between objects value of 13. Consider to reduce the number of dependencies under 13.
Open

class RuleDefinitions
{
    public static function get(): array
    {
        return [

CouplingBetweenObjects

Since: 1.1.0

A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

Example

class Foo {
    /**
     * @var \foo\bar\X
     */
    private $x = null;

    /**
     * @var \foo\bar\Y
     */
    private $y = null;

    /**
     * @var \foo\bar\Z
     */
    private $z = null;

    public function setFoo(\Foo $foo) {}
    public function setBar(\Bar $bar) {}
    public function setBaz(\Baz $baz) {}

    /**
     * @return \SplObjectStorage
     * @throws \OutOfRangeException
     * @throws \InvalidArgumentException
     * @throws \ErrorException
     */
    public function process(\Iterator $it) {}

    // ...
}

Source https://phpmd.org/rules/design.html#couplingbetweenobjects

The abstract declaration must precede the visibility declaration
Open

    protected abstract static function actionRoutingFunction();

The closing brace for the class must go on the next line after the body
Open

}

There must be one blank line after the namespace declaration
Open

namespace SAREhub\EasyECA\Rule;

Expected 1 blank line at end of file; 2 found
Open

}

The abstract declaration must precede the visibility declaration
Open

    protected abstract static function ruleGroupRulesExtractor();

There must be one blank line after the namespace declaration
Open

namespace SAREhub\EasyECA\Rule\Loader\Http;

There must be one blank line after the namespace declaration
Open

namespace SAREhub\EasyECA\Rule;

There must be one blank line after the namespace declaration
Open

namespace SAREhub\EasyECA\Rule\Definition;

There must be one blank line after the namespace declaration
Open

namespace SAREhub\EasyECA\Rule;

There must be one blank line after the namespace declaration
Open

namespace SAREhub\EasyECA\Rule\Loader;

The abstract declaration must precede the visibility declaration
Open

    protected abstract static function ruleGroupIdExtractor();

There must be one blank line after the namespace declaration
Open

namespace SAREhub\EasyECA\Rule;

There must be one blank line after the namespace declaration
Open

namespace SAREhub\EasyECA\Rule\Definition;

Missing class import via use statement (line '32', column '23').
Open

            throw new \SAREhub\EasyECA\Rule\Asserter\RuleAssertException("Hoa assert exception occurred", 500, $e);

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '47', column '19').
Open

        throw new \InvalidArgumentException("RuleGroupDefinition data is invalid: $message");

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '42', column '23').
Open

            throw new \InvalidArgumentException("ActionProcessorFactory to action: '$action' not found");

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '32', column '23').
Open

            throw new \SAREhub\EasyECA\Rule\Asserter\RuleAssertException("Hoa assert exception occurred", 500, $e);

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Severity
Category
Status
Source
Language