Completed
Push — master ( 813353...e05ee5 )
by BruceScrutinizer
08:42
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 add() 0 3 1
A getConflicts() 0 3 1
A __construct() 0 3 1
A get() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace NamespaceProtector\Result;
4
5
final class ResultProcessedFile implements ResultInterface
6
{
7
    /** @var string  */
8
    private $file;
9
10
    /** @var array<ResultInterface> */
11
    private $conflicts = [];
12
13
    public function __construct(string $file)
14
    {
15
        $this->file = $file;
16
    }
17
18
    public function get(): String
19
    {
20
        return $this->file;
21
    }
22
23
    public function add(ResultInterface $conflic): void
24
    {
25
        $this->conflicts[] = $conflic;
26
    }
27
28
    /** @return array<ResultInterface> */
29
    public function getConflicts(): array
30
    {
31
        return $this->conflicts;
32
    }
33
}
34