Conditions | 3 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function resolve(AbstractModel $entity, array $params = []) : int |
||
32 | { |
||
33 | $storeId = $entity->getStoreId(); |
||
34 | |||
35 | if (isset($params['_scope'])) { |
||
36 | $storeId = $this->storeManager->getStore($params['_scope'])->getId(); |
||
37 | } |
||
38 | |||
39 | if (!$storeId) { |
||
40 | $storeId = $this->storeManager->getStore()->getId(); |
||
41 | } |
||
42 | |||
43 | return $storeId; |
||
44 | } |
||
45 | } |
||
46 |