Total Complexity | 3 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | trait HasAttributes |
||
8 | { |
||
9 | /** |
||
10 | * Determine whether a value is JSON castable for inbound manipulation. |
||
11 | * |
||
12 | * @param string $key |
||
13 | * @return bool |
||
14 | */ |
||
15 | 44 | protected function isJsonCastable($key) |
|
18 | } |
||
19 | |||
20 | /** |
||
21 | * Decode the given JSON back into an array or object. |
||
22 | * |
||
23 | * @param string $value |
||
24 | * @param bool $asObject |
||
25 | * @return mixed |
||
26 | * |
||
27 | * @SuppressWarnings("PHPMD.BooleanArgumentFlag") |
||
28 | */ |
||
29 | 5 | public function fromJson($value, $asObject = false) |
|
40 |