php-aidc /
label-printer
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * This file is part of PhpAidc LabelPrinter package. |
||
| 5 | * |
||
| 6 | * © Appwilio (https://appwilio.com) |
||
| 7 | * © JhaoDa (https://github.com/jhaoda) |
||
| 8 | * |
||
| 9 | * For the full copyright and license information, please view the LICENSE |
||
| 10 | * file that was distributed with this source code. |
||
| 11 | */ |
||
| 12 | |||
| 13 | declare(strict_types=1); |
||
| 14 | |||
| 15 | namespace PhpAidc\LabelPrinter\Language\Fingerprint\Concerns; |
||
| 16 | |||
| 17 | use PhpAidc\LabelPrinter\Contract\Command; |
||
| 18 | use PhpAidc\LabelPrinter\Command\Concerns\Invertible; |
||
| 19 | |||
| 20 | trait Invert |
||
| 21 | { |
||
| 22 | public function invert(Command $command) |
||
| 23 | { |
||
| 24 | /** @var Command|Invertible $command */ |
||
| 25 | if ($command->isInverted()) { |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 26 | yield 'II'; |
||
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 30 | public function resetInvert(Command $command) |
||
| 31 | { |
||
| 32 | /** @var Command|Invertible $command */ |
||
| 33 | if ($command->isInverted()) { |
||
| 34 | yield 'NI'; |
||
| 35 | } |
||
| 36 | } |
||
| 37 | } |
||
| 38 |