Issues (13)

src/Language/Fingerprint/Concerns/Invert.php (1 issue)

Labels
Severity
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
The method isInverted() 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\TextLine or PhpAidc\LabelPrinter\Command\InternalImage or PhpAidc\LabelPrinter\Command\TextBlock or PhpAidc\LabelPrinter\Command\ExternalImage. ( Ignorable by Annotation )

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

25
        if ($command->/** @scrutinizer ignore-call */ isInverted()) {
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