This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
The method add cannot be called on $metric->get('violations') (of type null).
Methods can only be called on objects. This check looks for methods being called
on variables that have been inferred to never be objects.
Loading history...
33
return;
34
}
35
36
}
37
38
/**
39
* @inheritdoc
40
*/
41
public function getLevel()
42
{
43
return Violation::INFO;
44
}
45
46
/**
47
* @inheritdoc
48
*/
49
public function getDescription()
50
{
51
return <<<EOT
52
This class looks use really high number of components.
53
54
* Efferent coupling is {$this->metric->get('efferentCoupling')}, so this class uses {$this->metric->get('efferentCoupling')} differents external components.
55
56
Maybe you should check why this class has lot of dependencies.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.