WrappedStoreCommand::hasData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cycle\ORM\Command\Special;
6
7
use Cycle\ORM\Command\CommandInterface;
8
use Cycle\ORM\Command\StoreCommandInterface;
9
10
final class WrappedStoreCommand extends WrappedCommand implements StoreCommandInterface
11
{
12
    /** @var StoreCommandInterface */
13
    protected CommandInterface $command;
14
15 152
    public static function wrapStoreCommand(StoreCommandInterface $command): self
16
    {
17 152
        return new self($command);
18
    }
19
20
    public function registerAppendix(string $key, mixed $value): void
21
    {
22
        $this->command->registerAppendix($key, $value);
0 ignored issues
show
Bug introduced by
The method registerAppendix() does not exist on Cycle\ORM\Command\CommandInterface. It seems like you code against a sub-type of Cycle\ORM\Command\CommandInterface such as Cycle\ORM\Command\StoreCommandInterface or Cycle\ORM\Command\StoreCommand or Cycle\ORM\Command\Special\WrappedStoreCommand or Cycle\ORM\Command\Database\Update. ( Ignorable by Annotation )

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

22
        $this->command->/** @scrutinizer ignore-call */ 
23
                        registerAppendix($key, $value);
Loading history...
23
    }
24
25
    public function registerColumn(string $key, mixed $value): void
26
    {
27
        $this->command->registerColumn($key, $value);
0 ignored issues
show
Bug introduced by
The method registerColumn() does not exist on Cycle\ORM\Command\CommandInterface. It seems like you code against a sub-type of Cycle\ORM\Command\CommandInterface such as Cycle\ORM\Command\StoreCommandInterface or Cycle\ORM\Command\StoreCommand or Cycle\ORM\Command\Special\WrappedStoreCommand or Cycle\ORM\Command\Database\Update. ( Ignorable by Annotation )

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

27
        $this->command->/** @scrutinizer ignore-call */ 
28
                        registerColumn($key, $value);
Loading history...
28
    }
29
30 168
    public function hasData(): bool
31
    {
32 168
        return $this->command->hasData();
0 ignored issues
show
Bug introduced by
The method hasData() does not exist on Cycle\ORM\Command\CommandInterface. It seems like you code against a sub-type of Cycle\ORM\Command\CommandInterface such as Cycle\ORM\Command\StoreCommandInterface or Cycle\ORM\Command\StoreCommand or Cycle\ORM\Command\Special\WrappedStoreCommand or Cycle\ORM\Command\Database\Update. ( Ignorable by Annotation )

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

32
        return $this->command->/** @scrutinizer ignore-call */ hasData();
Loading history...
33
    }
34
}
35