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

StaticEntityWriterGateway   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 13
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A prefetchExistences() 0 2 1
A execute() 0 2 1
A getExistence() 0 3 1
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