It seems like the GitHub access token used for retrieving details about this repository from
GitHub became invalid. This might prevent certain types of inspections from being run (in
particular,
everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
This code seems to be duplicated across 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...
39
$this->files[$condition] = [];
40
}
41
array_unshift($this->files[$condition], $file);
42
return $this;
43
}
44
45
/**
46
* @param $file
47
* @param bool $condition
48
* @return $this
49
*/
50
public function remove($file, $condition = false)
51
{
52
unset($this->files[$condition][$file]);
53
return $this;
54
}
55
56
/**
57
* @return string
58
*/
59
public function __toString()
60
{
61
$return = '';
62
63
if (count($this->files)) {
64
foreach ($this->files as $condition => $files) {
65
foreach ($files as $file) {
66
$return .= $this->buildTag($file, $condition);
67
}
68
}
69
}
70
71
return $return;
72
}
73
74
/**
75
* @param $path
76
* @param $condition
77
* @return string
78
*/
79
public function buildTag($path, $condition = null)
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.