| Conditions | 3 |
| Paths | 3 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | public function process(ContainerBuilder $container) |
||
| 24 | { |
||
| 25 | // TODO Need to check if this is indeed the locale provider to use. |
||
| 26 | $scopes = [ |
||
| 27 | "default" => "Default scope label", |
||
| 28 | ]; |
||
| 29 | |||
| 30 | foreach (Locales::getLocales() as $code) { |
||
| 31 | $leveledCode = str_replace("_", "/", $code); |
||
| 32 | try { |
||
| 33 | $name = Locales::getName($code); |
||
| 34 | } catch (MissingResourceException $e) { |
||
| 35 | $name = $code; |
||
| 36 | } |
||
| 37 | |||
| 38 | $scopes["default/$leveledCode"] = $name; |
||
| 39 | } |
||
| 40 | |||
| 41 | $definition = $container->getDefinition('oliverde8.comfy_bundle.scope_resolver.locales'); |
||
| 42 | $definition->setArgument('$scopes', $scopes); |
||
| 43 | $definition->setArgument('$defaultScope', "default"); |
||
| 44 | } |
||
| 45 | } |
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