OutputFileCollection::fetchByPath()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace PODEntender\Domain\Model\FileProcessing;
4
5
use Illuminate\Support\Collection;
6
7
class OutputFileCollection extends Collection
8
{
9
    public function fetchByPath(string $path): ?OutputFile
10
    {
11
        return $this
12
            ->filter(function (OutputFile $file) use ($path) {
13
                return $file->path() === $path;
14
            })
15
            ->first();
16
    }
17
}
18