The method getAnchor() does not exist on PhpAidc\LabelPrinter\Contract\Command. It seems like you code against a sub-type of PhpAidc\LabelPrinter\Contract\Command such as PhpAidc\LabelPrinter\Command\Barcode or PhpAidc\LabelPrinter\Command\TextLine or PhpAidc\LabelPrinter\Command\TextBlock.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
27
if ($command->/** @scrutinizer ignore-call */ getAnchor() && !$command->getAnchor()->equals(Anchor::SOUTHWEST())) {
Loading history...
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
}
38
}
39
40
public function resetAlign(Command $command)
41
{
42
/** @var Command|Alignable $command */
43
if ($command->getAnchor() && !$command->getAnchor()->equals(Anchor::SOUTHWEST())) {