Total Complexity | 6 |
Total Lines | 80 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class Config |
||
12 | { |
||
13 | /** @var string */ |
||
14 | protected $header; |
||
15 | |||
16 | /** @var array */ |
||
17 | protected $platforms; |
||
18 | |||
19 | /** @var array */ |
||
20 | protected $environments; |
||
21 | |||
22 | public function __construct(array $data) |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @return string |
||
31 | * @author Casper Rasmussen <[email protected]> |
||
32 | */ |
||
33 | public function getHeader(): string |
||
34 | { |
||
35 | return $this->header; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @return array |
||
40 | * @author Casper Rasmussen <[email protected]> |
||
41 | */ |
||
42 | public function getPlatforms(): array |
||
43 | { |
||
44 | return $this->platforms; |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @return array |
||
49 | * @author Casper Rasmussen <[email protected]> |
||
50 | */ |
||
51 | public function getEnvironments(): array |
||
52 | { |
||
53 | return $this->environments; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * toArray |
||
58 | * |
||
59 | * @return array |
||
60 | * @author Casper Rasmussen <[email protected]> |
||
61 | */ |
||
62 | public function toArray(): array |
||
63 | { |
||
64 | return [ |
||
65 | 'header' => $this->header, |
||
66 | 'platforms' => $this->platforms, |
||
67 | 'environments' => $this->environments, |
||
68 | ]; |
||
69 | } |
||
70 | |||
71 | /** |
||
72 | * createDefault |
||
73 | * |
||
74 | * @return \NMeta\Config |
||
75 | * @author Casper Rasmussen <[email protected]> |
||
76 | */ |
||
77 | public static function createDefault(): self |
||
91 | ], |
||
92 | ]); |
||
93 | } |
||
94 | } |