Total Complexity | 5 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class ClassItem implements AutowireItemInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $className; |
||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | private $args; |
||
19 | |||
20 | 11 | public function __construct(string $className, array $args) |
|
24 | 11 | } |
|
25 | |||
26 | 1 | public function serialize(): string |
|
27 | { |
||
28 | 1 | return serialize([$this->className, $this->args]); |
|
29 | } |
||
30 | |||
31 | /** |
||
32 | * @param string $serialized |
||
33 | */ |
||
34 | 1 | public function unserialize($serialized): void |
|
35 | { |
||
36 | 1 | [$this->className, $this->args] = unserialize($serialized); |
|
37 | 1 | } |
|
38 | |||
39 | 10 | public function getClassName(): string |
|
40 | { |
||
41 | 10 | return $this->className; |
|
42 | } |
||
43 | |||
44 | 7 | public function getArgs(): array |
|
47 | } |
||
48 | } |
||
49 |