Passed
Push — trunk ( 38c860...f58bbf )
by Christian
13:34 queued 14s
created

ConfiguredSeoUrlRoute::getConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 1
c 1
b 1
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Shopware\Core\Content\Seo;
6
7
use Shopware\Core\Content\Seo\SeoUrlRoute\SeoUrlMapping;
8
use Shopware\Core\Content\Seo\SeoUrlRoute\SeoUrlRouteConfig;
9
use Shopware\Core\Content\Seo\SeoUrlRoute\SeoUrlRouteInterface;
10
use Shopware\Core\Framework\DataAbstractionLayer\Entity;
11
use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
12
use Shopware\Core\Framework\Log\Package;
13
use Shopware\Core\System\SalesChannel\SalesChannelEntity;
0 ignored issues
show
Bug introduced by
The type Shopware\Core\System\Sal...nnel\SalesChannelEntity 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...
14
15
#[Package('buyers-experience')]
16
class ConfiguredSeoUrlRoute implements SeoUrlRouteInterface
17
{
18
    public function __construct(
19
        private readonly SeoUrlRouteInterface $decorated,
20
        private readonly SeoUrlRouteConfig $config
21
    ) {
22
    }
23
24
    public function getConfig(): SeoUrlRouteConfig
25
    {
26
        return $this->config;
27
    }
28
29
    public function prepareCriteria(Criteria $criteria, SalesChannelEntity $salesChannel): void
30
    {
31
        $this->decorated->prepareCriteria($criteria, $salesChannel);
32
    }
33
34
    public function getMapping(Entity $entity, ?SalesChannelEntity $salesChannel): SeoUrlMapping
35
    {
36
        return $this->decorated->getMapping($entity, $salesChannel);
37
    }
38
}
39