Passed
Push — master ( 1d5d50...04e471 )
by BruceScrutinizer
02:13
created

ResultProcessedFile   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 27
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getConflicts() 0 3 1
A __construct() 0 3 1
A addConflic() 0 3 1
A getFileName() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace NamespaceProtector\Result;
4
5
final class ResultProcessedFile implements ResultProcessedFileEditableInterface
6
{
7
    /** @var string  */
8
    private $file;
9
10
    /** @var array<ErrorResult> */
11
    private $conflicts = [];
12
13
    public function __construct(string $file)
14
    {
15
        $this->file = $file;
16
    }
17
18
    public function getFileName(): String
19
    {
20
        return $this->file;
21
    }
22
23
    public function addConflic(ErrorResult $conflic): void
24
    {
25
        $this->conflicts[] = $conflic;
26
    }
27
28
    /** @return array<ErrorResult> */
29
    public function getConflicts(): array
30
    {
31
        return $this->conflicts;
32
    }
33
}
34