Total Complexity | 7 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | final class Manage |
||
13 | { |
||
14 | use Contains; |
||
15 | use Keyable; |
||
16 | use Logger; |
||
|
|||
17 | use Makeable; |
||
18 | |||
19 | protected $source; |
||
20 | |||
21 | protected $target; |
||
22 | |||
23 | protected $filename; |
||
24 | |||
25 | protected $full = false; |
||
26 | |||
27 | protected $key; |
||
28 | |||
29 | 11 | public function source(array $array): self |
|
30 | { |
||
31 | 11 | $this->source = $array; |
|
32 | |||
33 | 11 | return $this; |
|
34 | } |
||
35 | |||
36 | 11 | public function target(array $array): self |
|
37 | { |
||
38 | 11 | $this->target = $array; |
|
39 | |||
40 | 11 | return $this; |
|
41 | } |
||
42 | |||
43 | 11 | public function filename(string $filename): self |
|
44 | { |
||
45 | 11 | $this->filename = Path::filename($filename); |
|
46 | 11 | $this->key = $this->key($filename); |
|
47 | |||
48 | 11 | return $this; |
|
49 | } |
||
50 | |||
51 | 11 | public function full(bool $full): self |
|
56 | } |
||
57 | |||
58 | 11 | public function find(): ComparatorContract |
|
59 | { |
||
60 | 11 | $this->log('Comparison object definition...'); |
|
61 | |||
62 | 11 | return $this->resolve() |
|
63 | 11 | ->full($this->full) |
|
64 | 11 | ->key($this->key) |
|
65 | 11 | ->source($this->source) |
|
66 | 11 | ->target($this->target); |
|
67 | } |
||
68 | |||
69 | 11 | protected function resolve(): ComparatorContract |
|
74 | } |
||
75 | } |
||
76 |