Total Complexity | 8 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | trait General |
||
25 | { |
||
26 | protected $generalPath = 'general'; // Could be overridden by client classes |
||
27 | |||
28 | /** |
||
29 | * @inheritDoc |
||
30 | */ |
||
31 | public function getGeneralConfig($field = null, $storeId = null): string |
||
32 | { |
||
33 | return $this->scopeConfig->getValue($this->getXmlGeneralPath($field), ScopeInterface::SCOPE_STORE, $storeId) ?: ''; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @inheritDoc |
||
38 | */ |
||
39 | public function setValue($field, $value, $storeId = null): GeneralInterface |
||
40 | { |
||
41 | $storeId = $storeId ?: Store::DEFAULT_STORE_ID; |
||
42 | $scope = $storeId == Store::DEFAULT_STORE_ID ? ScopeConfigInterface::SCOPE_TYPE_DEFAULT : ScopeInterface::SCOPE_STORES; |
||
43 | $this->resourceConfig->saveConfig($this->getXmlGeneralPath($field), $value, $scope, $storeId); |
||
44 | return $this; |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @inheritDoc |
||
49 | */ |
||
50 | public function getXmlGeneralPath($field): string |
||
51 | { |
||
52 | $xmlPath = $this->getXmlBasePath() . '/' . $this->getGeneralPath(); |
||
53 | if ($field) { |
||
54 | $xmlPath .= '/' . $field; |
||
55 | } |
||
56 | return $xmlPath; |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * @inheritDoc |
||
61 | */ |
||
62 | public function getGeneralPath(): string |
||
65 | } |
||
66 | } |
||
67 |
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