| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function translate(Bitmap $command): iterable |
||
| 28 | { |
||
| 29 | yield from $this->position($command); |
||
| 30 | |||
| 31 | $data = RllCodec::create($command->getCanvas())->encode(); |
||
| 32 | |||
| 33 | $stream = \pack('n*', self::PRBUF_HEADER, $command->getWidth(), $command->getHeight()).$data; |
||
| 34 | |||
| 35 | yield \sprintf("PRBUF %d\n", \strlen($stream)).$stream; |
||
| 36 | |||
| 39 |