Conditions | 4 |
Paths | 6 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
24 | 1 | public static function fillFromArray(ArrayAccess $array, ?string $defaultLang): ?string |
|
25 | { |
||
26 | 1 | return $array->offsetExists(static::LANG_KEY) |
|
27 | 1 | && !empty($array->offsetGet(static::LANG_KEY)) |
|
28 | 1 | && is_string($array->offsetGet(static::LANG_KEY)) |
|
29 | 1 | ? $array->offsetGet(static::LANG_KEY) |
|
30 | 1 | : $defaultLang ; |
|
31 | } |
||
60 |