@@ -226,7 +226,7 @@ |
||
| 226 | 226 | |
| 227 | 227 | $flattened = iterator_to_array($data, true); |
| 228 | 228 | return $this->returnAsType([ |
| 229 | - array_keys($flattened)[count($flattened) -1] => array_values($flattened)[count($flattened) -1] |
|
| 229 | + array_keys($flattened)[count($flattened)-1] => array_values($flattened)[count($flattened)-1] |
|
| 230 | 230 | ]); |
| 231 | 231 | } |
| 232 | 232 | |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | |
| 186 | 186 | /** |
| 187 | 187 | * @param array $value |
| 188 | - * @return mixed null|string |
|
| 188 | + * @return string null|string |
|
| 189 | 189 | */ |
| 190 | 190 | public function toJson($value) |
| 191 | 191 | { |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | /** |
| 204 | - * @param mixed $value |
|
| 204 | + * @param string $value |
|
| 205 | 205 | * @return array |
| 206 | 206 | * @throws \JSONText\Exceptions\JSONTextException |
| 207 | 207 | */ |
@@ -383,7 +383,7 @@ |
||
| 383 | 383 | ]); |
| 384 | 384 | |
| 385 | 385 | if ($operator === $backendOperator && $result = $backendDBApiInst->$routine()) { |
| 386 | - return $result; |
|
| 386 | + return $result; |
|
| 387 | 387 | } |
| 388 | 388 | } |
| 389 | 389 | |
@@ -117,13 +117,13 @@ |
||
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | $keys = array_keys($operandAsArray); |
| 120 | - if (count($keys) >1) { |
|
| 120 | + if (count($keys) > 1) { |
|
| 121 | 121 | $msg = 'Sorry. I can\'t handle complex operands.'; |
| 122 | 122 | throw new JSONTextException($msg); |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | $vals = array_values($operandAsArray); |
| 126 | - if (count($vals) >1) { |
|
| 126 | + if (count($vals) > 1) { |
|
| 127 | 127 | $msg = 'Sorry. I can\'t handle complex operands.'; |
| 128 | 128 | throw new JSONTextException($msg); |
| 129 | 129 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | public function __construct() |
| 32 | 32 | { |
| 33 | - foreach($this->fixtures as $name => $path) { |
|
| 33 | + foreach ($this->fixtures as $name => $path) { |
|
| 34 | 34 | $this->fixtures[$name] = MODULE_DIR . '/' . $path; |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | $field->setValue($this->getFixture('hash_deep')); |
| 242 | 242 | $field->setReturnType('array'); |
| 243 | 243 | |
| 244 | - $this->assertEquals(["fast" => ["Kawasaki" => "KR1S250"],"slow" => ["Honda" => "FS150"]], $field->query('#>', '{"bikes":"japanese"}')); |
|
| 244 | + $this->assertEquals(["fast" => ["Kawasaki" => "KR1S250"], "slow" => ["Honda" => "FS150"]], $field->query('#>', '{"bikes":"japanese"}')); |
|
| 245 | 245 | |
| 246 | 246 | $this->setExpectedException('\JSONText\Exceptions\JSONTextException'); |
| 247 | 247 | $field->query('#>', '{"bikes","japanese"}'); // Bad JSON |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | $field->setValue($this->getFixture('hash_dupes')); |
| 272 | 272 | $field->setReturnType('array'); |
| 273 | 273 | |
| 274 | - $this->assertEquals([["Subaru" => "Impreza"],["Kawasaki" => "KR1S250"]], $field->query('#>', '{"japanese":"fast"}')); |
|
| 274 | + $this->assertEquals([["Subaru" => "Impreza"], ["Kawasaki" => "KR1S250"]], $field->query('#>', '{"japanese":"fast"}')); |
|
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | /** |