Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3.3332 |
Changes | 0 |
1 | <?php |
||
62 | 1 | public function decode($str) |
|
63 | { |
||
64 | 1 | if (($this->flags & self::DECODE_ARRAY) === self::DECODE_ARRAY) |
|
65 | { |
||
66 | return json_decode($str, true); |
||
67 | } |
||
68 | 1 | else if (($this->flags & self::DECODE_OBJECT) === self::DECODE_OBJECT) |
|
69 | { |
||
70 | 1 | return json_decode($str); |
|
71 | } |
||
72 | |||
73 | return null; |
||
74 | } |
||
75 | } |
||
76 |