Completed
Push — master ( f8b922...fa2323 )
by Taras
01:00 queued 18s
created

StockConfig   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getEventQueueName() 0 3 1
A isConditionalStockUpdateApplied() 0 3 1
A getStoreToWarehouseMapping() 0 12 1
1
<?php
2
3
/**
4
 * This file is part of the Spryker Commerce OS.
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
declare(strict_types = 1);
9
10
namespace Pyz\Zed\Stock;
11
12
use Spryker\Shared\Publisher\PublisherConfig;
13
use Spryker\Zed\Stock\StockConfig as SprykerStockConfig;
14
15
class StockConfig extends SprykerStockConfig
16
{
17
    /**
18
     * @return array<string, list<string>>
0 ignored issues
show
Documentation Bug introduced by
The doc comment array<string, list<string>> at position 4 could not be parsed: Expected '>' at position 4, but found 'list'.
Loading history...
19
     */
20
    public function getStoreToWarehouseMapping(): array
21
    {
22
        return [
23
            'DE' => [
24
                'Warehouse1',
25
                'Warehouse2',
26
            ],
27
            'AT' => [
28
                'Warehouse2',
29
            ],
30
            'US' => [
31
                'Warehouse2',
32
            ],
33
        ];
34
    }
35
36
    /**
37
     * @return bool
38
     */
39
    public function isConditionalStockUpdateApplied(): bool
40
    {
41
        return true;
42
    }
43
44
    /**
45
     * @return string|null
46
     */
47
    public function getEventQueueName(): ?string
48
    {
49
        return PublisherConfig::PUBLISH_QUEUE;
50
    }
51
}
52