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.
Loading history...
10
public $declaration;
11
12
function __construct( $declaration ) {
13
$this->declaration = $declaration;
14
}
15
16
function to_csv_array() {
17
return array(
18
$this->type(),
19
$this->declaration->path,
20
$this->declaration->line,
21
$this->declaration->display_name(),
22
);
23
}
24
25
public function type() {
26
return 'class_const_missing';
27
}
28
29
public function find_invocation_warnings( $invocation, $warnings ) {
30
if ( $invocation instanceof Static_Const ) {
31
if ( $invocation->class_name === $this->declaration->class_name
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.