| Total Complexity | 3 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | class Util |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * Prepares options. |
||
| 23 | * |
||
| 24 | * @param string|array $value Option. If provided a string will be assumed to be json and it will attempt to json_decode it and merge it with defaults. Or provide the array yourself. |
||
| 25 | * @param array $defaults Defaults for the options array |
||
| 26 | * @return array Merged array from $defaults and $value |
||
| 27 | */ |
||
| 28 | 95 | public static function prepareOptions($value, $defaults = []) |
|
| 37 |