Position   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 6
ccs 0
cts 3
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A position() 0 4 1
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\PositionAware;
19
20
trait Position
21
{
22
    public function position(Command $command)
23
    {
24
        /** @var Command|PositionAware $command */
25
        yield "PP {$command->getX()},{$command->getY()}";
0 ignored issues
show
Bug introduced by
The method getX() does not exist on PhpAidc\LabelPrinter\Contract\Command. It seems like you code against a sub-type of said class. However, the method does not exist in PhpAidc\LabelPrinter\Command\Clear or PhpAidc\LabelPrinter\Command\Raw. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

25
        yield "PP {$command->/** @scrutinizer ignore-call */ getX()},{$command->getY()}";
Loading history...
Bug introduced by
The method getY() does not exist on PhpAidc\LabelPrinter\Contract\Command. It seems like you code against a sub-type of said class. However, the method does not exist in PhpAidc\LabelPrinter\Command\Clear or PhpAidc\LabelPrinter\Command\Raw. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

25
        yield "PP {$command->getX()},{$command->/** @scrutinizer ignore-call */ getY()}";
Loading history...
26
    }
27
}
28