| Conditions | 4 |
| Paths | 3 |
| Total Lines | 22 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 26 | public function translate($value, array $payload) |
||
| 27 | { |
||
| 28 | $defaultLocales = $this->getLocales(); |
||
| 29 | |||
| 30 | $key = $this->options['key'] ?? static::KEY_NAME; |
||
| 31 | |||
| 32 | if (!$value && $defaultLocales) { |
||
| 33 | $code = $payload['category_key']; |
||
| 34 | foreach ($defaultLocales as $locale) { |
||
| 35 | $value[$locale] = [ |
||
| 36 | $key => $code, |
||
| 37 | ]; |
||
| 38 | } |
||
| 39 | |||
| 40 | return $value; |
||
| 41 | } |
||
| 42 | |||
| 43 | return array_map(function ($value) use ($key) { |
||
| 44 | return [ |
||
| 45 | $key => $value, |
||
| 46 | ]; |
||
| 47 | }, $value); |
||
| 48 | } |
||
| 58 |
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