Total Complexity | 5 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Coverage | 90% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
25 | class SerializePacker implements PackerInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $options; |
||
31 | |||
32 | /** |
||
33 | * SerializePacker constructor |
||
34 | * |
||
35 | * @param array $options Any options to be provided to unserialize() |
||
36 | */ |
||
37 | 868 | public function __construct(array $options = ['allowed_classes' => true]) |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * Get cache type (might be used as file extension) |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | 394 | public function getType() |
|
50 | } |
||
51 | |||
52 | /** |
||
53 | * Pack the value |
||
54 | * |
||
55 | * @param mixed $value |
||
56 | * @return string |
||
57 | */ |
||
58 | 634 | public function pack($value) |
|
61 | } |
||
62 | |||
63 | /** |
||
64 | * Unpack the value |
||
65 | * |
||
66 | * @param string $packed |
||
67 | * @return string |
||
68 | * @throws \UnexpectedValueException if he value can't be unpacked |
||
69 | */ |
||
70 | 292 | public function unpack($packed) |
|
79 |