Total Complexity | 5 |
Total Lines | 61 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
15 | class PropertyMetadata implements \Serializable |
||
16 | { |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | public $class; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | public $name; |
||
26 | |||
27 | 3 | public function __construct(string $class, string $name) |
|
31 | 3 | } |
|
32 | |||
33 | /** |
||
34 | * @return string |
||
35 | * |
||
36 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint |
||
37 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint |
||
38 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessReturnAnnotation |
||
39 | */ |
||
40 | 1 | public function serialize() |
|
41 | { |
||
42 | 1 | return serialize($this->__serialize()); |
|
43 | 1 | } |
|
44 | 1 | ||
45 | /** |
||
46 | * @param string $str |
||
47 | * |
||
48 | * @return void |
||
49 | * |
||
50 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint |
||
51 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint |
||
52 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessReturnAnnotation |
||
53 | */ |
||
54 | public function unserialize($str) |
||
57 | 1 | } |
|
58 | |||
59 | 1 | /** |
|
60 | 1 | * @return array<string> |
|
61 | */ |
||
62 | public function __serialize(): array |
||
67 | ]; |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @param array<string> $data |
||
72 | */ |
||
73 | public function __unserialize(array $data): void |
||
78 |