| Total Complexity | 5 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class ConfigFixture |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Sets configuration in default scope AND all stores, no matter what was configured previously |
||
| 17 | * |
||
| 18 | * @param string $path |
||
| 19 | * @param mixed $value |
||
| 20 | */ |
||
| 21 | 2 | public static function setGlobal(string $path, $value): void |
|
| 22 | { |
||
| 23 | 2 | self::scopeConfig()->setValue($path, $value, ScopeConfigInterface::SCOPE_TYPE_DEFAULT); |
|
| 24 | 2 | foreach (self::storeRepository()->getList() as $store) { |
|
| 25 | 2 | self::scopeConfig()->setValue($path, $value, ScopeInterface::SCOPE_STORE, $store->getCode()); |
|
| 26 | } |
||
| 27 | 2 | } |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Sets configuration in store scope |
||
| 31 | * |
||
| 32 | * @param string $path |
||
| 33 | * @param mixed $value |
||
| 34 | * @param null $storeCode store code or NULL for current store |
||
| 35 | */ |
||
| 36 | 2 | public static function setForStore(string $path, $value, $storeCode = null) : void |
|
| 39 | 2 | } |
|
| 40 | |||
| 41 | 4 | private static function scopeConfig(): MutableScopeConfigInterface |
|
| 42 | { |
||
| 43 | 4 | return Bootstrap::getObjectManager()->get(MutableScopeConfigInterface::class); |
|
| 44 | } |
||
| 45 | |||
| 46 | 2 | private static function storeRepository(): StoreRepositoryInterface |
|
| 49 | } |
||
| 50 | } |
||
| 51 |
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