Conditions | 6 |
Paths | 3 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | public function binary_data_json_decode($text) { |
||
36 | $struct = json_decode($text, true, 2); |
||
37 | |||
38 | if (!is_array($struct) || count($struct) !== 2) { |
||
39 | return null; |
||
40 | } |
||
41 | |||
42 | if (!isset($struct[0]) || !isset($struct[1]) || $struct[0] !== self::class) { |
||
43 | return null; |
||
44 | } |
||
45 | |||
46 | return base64_decode($struct[1]); |
||
47 | } |
||
48 | } |
||
49 |