Total Complexity | 6 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
7 | final class Config |
||
8 | { |
||
9 | private string $name; |
||
10 | |||
11 | private string $type; |
||
12 | |||
13 | private string $description; |
||
14 | |||
15 | public function __construct(string $name, string $type, string $description) |
||
16 | { |
||
17 | $this->name = $name; |
||
18 | $this->type = $type; |
||
19 | $this->description = $description; |
||
20 | } |
||
21 | |||
22 | public function __toString(): string |
||
23 | { |
||
24 | return $this->name . '*' . $this->type . '*' . $this->description; |
||
25 | } |
||
26 | |||
27 | public static function fromString(string $string): Config |
||
32 | } |
||
33 | |||
34 | public function name(): string |
||
35 | { |
||
36 | return $this->name; |
||
37 | } |
||
38 | |||
39 | public function type(): string |
||
42 | } |
||
43 | |||
44 | public function description(): string |
||
47 | } |
||
48 | } |
||
49 |