| Total Complexity | 5 |
| Total Lines | 55 |
| 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) |
||
| 55 | { |
||
| 56 | $this->__unserialize((array) unserialize((string) $str)); |
||
| 57 | 1 | } |
|
| 58 | |||
| 59 | 1 | public function __serialize(): array |
|
| 64 | ]; |
||
| 65 | } |
||
| 66 | |||
| 67 | public function __unserialize(array $data): void |
||
| 70 | } |
||
| 71 | } |
||
| 72 |