Total Complexity | 4 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | final class Property |
||
8 | { |
||
9 | /** @var string */ |
||
10 | private $name; |
||
11 | /** @var string|int|float|bool|array<string|int|float|bool> */ |
||
12 | private $value; |
||
13 | |||
14 | /** |
||
15 | * @param string|int|float|bool|array<string|int|float|bool> $value |
||
16 | */ |
||
17 | private function __construct(string $name, $value) |
||
18 | { |
||
19 | $this->name = $name; |
||
20 | $this->value = $value; |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * @param string|int|float|bool|array<string|int|float|bool> $value |
||
25 | */ |
||
26 | public static function create(string $name, $value): self |
||
27 | { |
||
28 | return new self($name, $value); |
||
29 | } |
||
30 | |||
31 | public function name(): string |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @return string|int|float|bool|array<string|int|float|bool> |
||
38 | */ |
||
39 | public function value() |
||
44 |