| Conditions | 5 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function align(Command $command) |
||
| 25 | { |
||
| 26 | /** @var Command|Alignable $command */ |
||
| 27 | if ($command->getAnchor() && !$command->getAnchor()->equals(Anchor::SOUTHWEST())) { |
||
|
|
|||
| 28 | $anchor = $command->getAnchor()->getValue(); |
||
| 29 | |||
| 30 | $newAnchor = $anchor + 6; |
||
| 31 | |||
| 32 | if ($newAnchor > 9) { |
||
| 33 | $newAnchor = $anchor > 6 ? $anchor - 6 : $anchor; |
||
| 34 | } |
||
| 35 | |||
| 36 | yield "AN {$newAnchor}"; |
||
| 37 | } |
||
| 48 |