Passed
Push — trunk ( 60c287...522604 )
by Christian
21:52 queued 08:22
created

StaticEntityWriterGateway::getExistence()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 4
dl 0
loc 3
rs 10
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Core\Test\Stub\DataAbstractionLayer;
4
5
use Shopware\Core\Framework\DataAbstractionLayer\EntityDefinition;
6
use Shopware\Core\Framework\DataAbstractionLayer\Write\Command\WriteCommandQueue;
7
use Shopware\Core\Framework\DataAbstractionLayer\Write\EntityExistence;
8
use Shopware\Core\Framework\DataAbstractionLayer\Write\EntityWriteGatewayInterface;
9
use Shopware\Core\Framework\DataAbstractionLayer\Write\WriteContext;
10
use Shopware\Core\Framework\DataAbstractionLayer\Write\WriteParameterBag;
11
12
/**
13
 * @final
14
 */
15
class StaticEntityWriterGateway implements EntityWriteGatewayInterface
16
{
17
    public function prefetchExistences(WriteParameterBag $parameterBag): void
18
    {
19
    }
20
21
    public function getExistence(EntityDefinition $definition, array $primaryKey, array $data, WriteCommandQueue $commandQueue): EntityExistence
22
    {
23
        return new EntityExistence($definition->getEntityName(), $primaryKey, false, false, false, []);
24
    }
25
26
    public function execute(array $commands, WriteContext $context): void
27
    {
28
    }
29
}
30