Passed
Push — trunk ( 0b4eb7...c6408d )
by Christian
11:59 queued 12s
created

PartialSalesChannelEntityLoadedEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getEntities() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Core\System\SalesChannel\Entity;
4
5
use Shopware\Core\Framework\DataAbstractionLayer\EntityDefinition;
6
use Shopware\Core\Framework\DataAbstractionLayer\PartialEntity;
0 ignored issues
show
Bug introduced by
The type Shopware\Core\Framework\...tionLayer\PartialEntity was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Shopware\Core\System\SalesChannel\SalesChannelContext;
8
9
/**
10
 * @package sales-channel
11
 *
12
 * @internal
13
 */
14
class PartialSalesChannelEntityLoadedEvent extends SalesChannelEntityLoadedEvent
15
{
16
    /**
17
     * @var PartialEntity[]
18
     */
19
    protected $entities;
20
21
    public function __construct(EntityDefinition $definition, array $entities, SalesChannelContext $context)
22
    {
23
        parent::__construct($definition, $entities, $context);
24
25
        $this->name = $this->definition->getEntityName() . '.partial_loaded';
26
    }
27
28
    /**
29
     * @return PartialEntity[]
30
     */
31
    public function getEntities(): array
32
    {
33
        return $this->entities;
34
    }
35
}
36