OutputFileCollection   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A fetchByPath() 0 7 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