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
*/
- Read upRead up
- Exclude checks
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 [
- Read upRead up
- Exclude checks
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 [
- Read upRead up
- Exclude checks
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 ruleGroupRulesExtractor();
- Exclude checks
There must be one blank line after the namespace declaration Open
namespace SAREhub\EasyECA\Rule\Loader\Http;
- Exclude checks
There must be one blank line after the namespace declaration Open
namespace SAREhub\EasyECA\Rule\Definition;
- Exclude checks
There must be one blank line after the namespace declaration Open
namespace SAREhub\EasyECA\Rule;
- Exclude checks
There must be one blank line after the namespace declaration Open
namespace SAREhub\EasyECA\Rule;
- Exclude checks
The closing brace for the class must go on the next line after the body Open
}
- Exclude checks
Expected 1 blank line at end of file; 2 found Open
}
- Exclude checks
The abstract declaration must precede the visibility declaration Open
protected abstract static function actionRoutingFunction();
- Exclude checks
There must be one blank line after the namespace declaration Open
namespace SAREhub\EasyECA\Rule;
- Exclude checks
The abstract declaration must precede the visibility declaration Open
protected abstract static function ruleGroupIdExtractor();
- Exclude checks
There must be one blank line after the namespace declaration Open
namespace SAREhub\EasyECA\Rule;
- Exclude checks
There must be one blank line after the namespace declaration Open
namespace SAREhub\EasyECA\Rule\Definition;
- Exclude checks
There must be one blank line after the namespace declaration Open
namespace SAREhub\EasyECA\Rule\Loader;
- Exclude checks
Missing class import via use statement (line '32', column '23'). Open
throw new \SAREhub\EasyECA\Rule\Asserter\RuleAssertException("Hoa assert exception occurred", 500, $e);
- Read upRead up
- Exclude checks
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 '31', column '24'). Open
throw new \InvalidArgumentException("RuleDefinition data is invalid: empty condition");
- Read upRead up
- Exclude checks
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 '35', column '23'). Open
throw new \InvalidArgumentException("RuleDefinition data is invalid: onPass or onFail must be defined");
- Read upRead up
- Exclude checks
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");
- Read upRead up
- Exclude checks
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();
}