Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
36 | 4 | public function write($items): string |
|
37 | { |
||
38 | 4 | if (false === is_array($items)) { |
|
39 | 2 | throw new \InvalidArgumentException('Vector::write() must be supplied with an array'); |
|
40 | } |
||
41 | |||
42 | 2 | $parser = new Parser(); |
|
43 | return $parser |
||
44 | 2 | ->writeArray($items) |
|
45 | 2 | ->getBuffer() |
|
46 | 2 | ->getBinary(); |
|
47 | } |
||
48 | |||
69 |