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 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...
12
{
13
/**
14
* @param \SplFileInfo $basePath
15
* @return PHPRangeFileDirectory
16
* @throws \UCD\Exception\InvalidArgumentException
17
*/
18
public static function fromPath(\SplFileInfo $basePath)
19
{
20
$files = [];
21
$fileInfos = FileIterator::fromPath($basePath);
22
23
foreach ($fileInfos as $fileInfo) {
24
$file = PHPRangeFile::fromFileInfo($fileInfo);
25
array_push($files, $file);
26
}
27
28
return new self($basePath, new RangeFiles($files));
29
}
30
31
/**
32
* @param Range $range
33
* @param int $total
34
* @return RangeFile
35
*/
36
protected function createFileFromRangeAndTotal(Range $range, $total)
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.