Completed
Push — master ( 83f346...123e90 )
by Russell
06:33
created
code/models/fieldtypes/JSONText.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
code/models/JSONBackend.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,13 +117,13 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
tests/JSONTextTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@
 block discarded – undo
229 229
         $field->setValue($this->getFixture('hash_deep'));
230 230
         $field->setReturnType('array');
231 231
         
232
-        $this->assertEquals(["fast" => ["Kawasaki" => "KR1S250"],"slow" => ["Honda" => "FS150"]], $field->query('#>', '{"bikes":"japanese"}'));
232
+        $this->assertEquals(["fast" => ["Kawasaki" => "KR1S250"], "slow" => ["Honda" => "FS150"]], $field->query('#>', '{"bikes":"japanese"}'));
233 233
 
234 234
         $this->setExpectedException('\JSONText\Exceptions\JSONTextException');
235 235
         $field->query('#>', '{"bikes","japanese"}'); // Bad JSON
Please login to merge, or discard this patch.