@@ -123,8 +123,9 @@ discard block |
||
| 123 | 123 | |
| 124 | 124 | $result = array_intersect($subset, $array); |
| 125 | 125 | |
| 126 | - if ($strict) |
|
| 127 | - return $result === $subset; |
|
| 126 | + if ($strict) { |
|
| 127 | + return $result === $subset; |
|
| 128 | + } |
|
| 128 | 129 | |
| 129 | 130 | return $result == $subset; |
| 130 | 131 | } |
@@ -133,7 +134,9 @@ discard block |
||
| 133 | 134 | if (!function_exists('is_associative_array')) { |
| 134 | 135 | function is_associative_array(array $arr) |
| 135 | 136 | { |
| 136 | - if (array() === $arr) return false; |
|
| 137 | + if (array() === $arr) { |
|
| 138 | + return false; |
|
| 139 | + } |
|
| 137 | 140 | return array_keys($arr) !== range(0, count($arr) - 1); |
| 138 | 141 | } |
| 139 | 142 | } |
@@ -65,8 +65,9 @@ |
||
| 65 | 65 | |
| 66 | 66 | protected function decodeHttpContent($content, $unwrap = true) |
| 67 | 67 | { |
| 68 | - if ($unwrap) |
|
| 69 | - return json_decode($content, true)['data']; |
|
| 68 | + if ($unwrap) { |
|
| 69 | + return json_decode($content, true)['data']; |
|
| 70 | + } |
|
| 70 | 71 | return json_decode($content, true); |
| 71 | 72 | } |
| 72 | 73 | |