| Total Complexity | 6 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | class Value |
||
| 27 | { |
||
| 28 | /** |
||
| 29 | * Check if a value is an array of options |
||
| 30 | * |
||
| 31 | * @param mixed $xValue |
||
| 32 | * |
||
| 33 | * @return bool |
||
| 34 | */ |
||
| 35 | public static function containsOptions($xValue): bool |
||
| 36 | { |
||
| 37 | if(!is_array($xValue) || count($xValue) === 0) |
||
| 38 | { |
||
| 39 | return false; |
||
| 40 | } |
||
| 41 | foreach(array_keys($xValue) as $xKey) |
||
| 42 | { |
||
| 43 | if(!is_string($xKey)) |
||
| 44 | { |
||
| 45 | return false; |
||
| 46 | } |
||
| 47 | } |
||
| 48 | return true; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Get an array of options names |
||
| 53 | * |
||
| 54 | * @param string $sOptionName |
||
| 55 | * |
||
| 56 | * @return array |
||
| 57 | */ |
||
| 58 | public static function explodeName(string $sOptionName): array |
||
| 63 | } |
||
| 64 | } |
||
| 65 |