| Total Complexity | 4 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class NotFoundSerializer |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var InventorySerializer |
||
| 20 | 96 | */ |
|
| 21 | private $invSerializer; |
||
| 22 | 96 | ||
| 23 | 96 | /** |
|
| 24 | * @var Vector |
||
| 25 | */ |
||
| 26 | private $vectorInvSer; |
||
| 27 | |||
| 28 | 3 | /** |
|
| 29 | * @param InventorySerializer $inv |
||
| 30 | 3 | */ |
|
| 31 | 3 | public function __construct(InventorySerializer $inv) |
|
| 32 | 3 | { |
|
| 33 | 3 | $this->invSerializer = $inv; |
|
| 34 | 3 | $this->vectorInvSer = Types::vector(function (Parser $parser): Inventory { |
|
| 35 | return $this->invSerializer->fromParser($parser); |
||
| 36 | }); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param Parser $parser |
||
| 41 | 3 | * @return NotFound |
|
| 42 | */ |
||
| 43 | 3 | public function fromParser(Parser $parser): NotFound |
|
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param BufferInterface $data |
||
| 51 | 3 | * @return NotFound |
|
| 52 | */ |
||
| 53 | 3 | public function parse(BufferInterface $data): NotFound |
|
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @param NotFound $notFound |
||
| 60 | 3 | * @return BufferInterface |
|
| 61 | */ |
||
| 62 | 3 | public function serialize(NotFound $notFound): BufferInterface |
|
| 67 |