Total Complexity | 6 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
8 | class ShopProvider |
||
9 | { |
||
10 | /** |
||
11 | * @var null|Shop |
||
12 | */ |
||
13 | private $shop; |
||
14 | |||
15 | /** |
||
16 | * @var ModelManager |
||
17 | */ |
||
18 | private $models; |
||
19 | |||
20 | /** |
||
21 | * @param ModelManager $models |
||
22 | * @param Shop|null $shop |
||
23 | */ |
||
24 | public function __construct(ModelManager $models, Shop $shop = null) |
||
25 | { |
||
26 | $this->models = $models; |
||
27 | $this->shop = $shop; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @return Shop |
||
32 | */ |
||
33 | public function getShop(): Shop |
||
34 | { |
||
35 | if (!$this->shop) { |
||
36 | $this->shop = $this->getDefaultShop(); |
||
37 | } |
||
38 | |||
39 | return $this->shop; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return int |
||
44 | */ |
||
45 | public function getShopId(): int |
||
46 | { |
||
47 | return $this->getShop()->getId(); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @return \Shopware\Models\Shop\DetachedShop |
||
52 | */ |
||
53 | public function getDefaultShop() |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @return int |
||
60 | */ |
||
61 | public function getDefaultShopId() |
||
64 | } |
||
65 | } |
||
66 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths