CocotteFinder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 9
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A exactFile() 0 7 1
1
<?php declare(strict_types=1);
2
3
namespace Cocotte\Finder;
4
5
final class CocotteFinder extends \Symfony\Component\Finder\Finder implements Finder
6
{
7
    public function exactFile(string $realPath): Finder
8
    {
9
        $search = new \SplFileInfo($realPath);
10
11
        return $this->in($search->getPath())->filter(
12
            function (\SplFileInfo $found) use ($search) {
13
                return $search->getRealPath() === $found->getRealPath();
14
            }
15
        );
16
    }
17
18
}