Total Complexity | 3 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class ExtensionProperty |
||
9 | { |
||
10 | /** |
||
11 | * Exact name of the property that will be used in the generated schema. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | private $name; |
||
16 | |||
17 | /** |
||
18 | * Value of the property |
||
19 | * |
||
20 | * @var mixed |
||
21 | */ |
||
22 | private $value; |
||
23 | |||
24 | /** |
||
25 | * @param string $name Extension property name without the 'x-' prefix. |
||
26 | * @param mixed|null $value |
||
27 | */ |
||
28 | 3 | public function __construct(string $name, $value = null) |
|
29 | { |
||
30 | 3 | $this->name = 'x-' . $name; |
|
31 | 3 | $this->value = $value; |
|
32 | 3 | } |
|
33 | |||
34 | /** |
||
35 | * @return string |
||
36 | */ |
||
37 | 3 | public function getName(): string |
|
38 | { |
||
39 | 3 | return $this->name; |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return mixed |
||
44 | */ |
||
45 | 3 | public function getValue() |
|
48 | } |
||
49 | } |
||
50 |