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...
22
$this->basePath = substr($basePath, 0, -1);
23
} else {
24
$this->basePath = $basePath;
25
}
26
27
return $this;
28
}
29
30
/**
31
* Removes the basepath from a path.
32
*
33
* @param string $path
34
*
35
* @return string
36
*/
37
private function getPath($path)
38
{
39
if ($this->basePath === '' || strpos($path, $this->basePath) === 0) {
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.