Total Complexity | 7 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class ResultFormatRegistrator { |
||
8 | |||
9 | /** |
||
10 | * @var callable |
||
11 | */ |
||
12 | private $registry; |
||
13 | |||
14 | private string $name; |
||
15 | private string $nameMessageKey; |
||
16 | 5 | private array $parameterDefinitions; |
|
17 | 5 | ||
18 | 5 | /** |
|
19 | * @var callable |
||
20 | 5 | */ |
|
21 | 5 | private $constructionFunction; |
|
22 | 5 | ||
23 | public function __construct( callable $registry ) { |
||
24 | $this->registry = $registry; |
||
25 | 5 | } |
|
26 | 5 | ||
27 | 5 | public function withName( string $name ): self { |
|
28 | $this->name = $name; |
||
29 | return $this; |
||
30 | 5 | } |
|
31 | 5 | ||
32 | 5 | public function andMessageKey( string $nameMessageKey ): self { |
|
33 | $this->nameMessageKey = $nameMessageKey; |
||
34 | return $this; |
||
35 | 5 | } |
|
36 | 5 | ||
37 | 5 | public function andParameterDefinitions( array $parameterDefinitions ): self { |
|
38 | $this->parameterDefinitions = $parameterDefinitions; |
||
39 | return $this; |
||
40 | 5 | } |
|
41 | 5 | ||
42 | 5 | public function andPresenterBuilder( callable $constructionFunction ): self { |
|
43 | $this->constructionFunction = $constructionFunction; |
||
44 | 5 | return $this; |
|
45 | 5 | } |
|
46 | 5 | ||
47 | 5 | public function register(): void { |
|
49 | 5 | } |
|
50 | |||
51 | private function newResultFormat(): ResultFormat { |
||
57 | ); |
||
58 | } |
||
59 | |||
60 | } |
||
61 |