Total Complexity | 7 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | class QuoteShipmentExpander implements QuoteShipmentExpanderInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var \SprykerEco\Client\Computop\Zed\ComputopStubInterface $computopStub |
||
17 | */ |
||
18 | protected $computopStub; |
||
19 | |||
20 | /** |
||
21 | * @param \SprykerEco\Client\Computop\Zed\ComputopStubInterface $computopStub |
||
22 | */ |
||
23 | public function __construct(ComputopStubInterface $computopStub) |
||
24 | { |
||
25 | $this->computopStub = $computopStub; |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer |
||
30 | * |
||
31 | * @return \Generated\Shared\Transfer\QuoteTransfer |
||
32 | */ |
||
33 | public function expandQuoteWithDefaultShippingMethod(QuoteTransfer $quoteTransfer): QuoteTransfer |
||
34 | { |
||
35 | if ($quoteTransfer->getItems()->count() === 0 || $this->isQuoteHasShipment($quoteTransfer)) { |
||
36 | return $quoteTransfer; |
||
37 | } |
||
38 | |||
39 | return $this->computopStub->expandQuoteWithDefaultShippingMethod($quoteTransfer); |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer |
||
44 | * |
||
45 | * @return bool |
||
46 | */ |
||
47 | protected function isQuoteHasShipment(QuoteTransfer $quoteTransfer): bool |
||
59 | } |
||
60 | } |
||
61 |
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