Completed
Push — master ( 6b7849...00594a )
by Russell
02:09
created
tests/JSONTextBasicTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public function __construct()
30 30
     {
31
-        foreach($this->fixtures as $name => $path) {
31
+        foreach ($this->fixtures as $name => $path) {
32 32
             $this->fixtures[$name] = MODULE_DIR . '/' . $path;
33 33
         }
34 34
     }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
  */
9 9
 
10 10
 use JSONText\Fields\JSONText;
11
-use JSONText\Exceptions;
12 11
 
13 12
 class JSONTextBasicTest extends SapphireTest
14 13
 {
Please login to merge, or discard this patch.
tests/JSONTextQueryTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function __construct()
54 54
     {
55
-        foreach($this->fixtures as $name => $path) {
55
+        foreach ($this->fixtures as $name => $path) {
56 56
             $this->fixtures[$name] = MODULE_DIR . '/' . $path;
57 57
         }
58 58
     }
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         $field->setReturnType('array');
279 279
         $field->setValue($this->getFixture('object'));
280 280
         $this->assertEquals(
281
-            [['Subaru' => 'Impreza'],['Kawasaki' => 'KR1S250']],
281
+            [['Subaru' => 'Impreza'], ['Kawasaki' => 'KR1S250']],
282 282
             $field->query('#>', '{"japanese":"fast"}')
283 283
         );
284 284
 
Please login to merge, or discard this patch.
tests/JSONTextSetValueTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public function __construct()
30 30
     {
31
-        foreach($this->fixtures as $name => $path) {
31
+        foreach ($this->fixtures as $name => $path) {
32 32
             $this->fixtures[$name] = MODULE_DIR . '/' . $path;
33 33
         }
34 34
     }
Please login to merge, or discard this patch.
tests/JSONTextIntegrationTest.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,6 @@
 block discarded – undo
6 6
  * @author Russell Michell <[email protected]>
7 7
  */
8 8
 
9
-use JSONText\Exceptions;
10
-
11 9
 class JSONTextIntegrationTest extends SapphireTest
12 10
 {
13 11
     
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
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public function __construct()
30 30
     {
31
-        foreach($this->fixtures as $name => $path) {
31
+        foreach ($this->fixtures as $name => $path) {
32 32
             $this->fixtures[$name] = MODULE_DIR . '/' . $path;
33 33
         }
34 34
     }
Please login to merge, or discard this patch.
code/models/fieldtypes/JSONText.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@
 block discarded – undo
239 239
     }
240 240
 
241 241
     /**
242
-     * @param mixed $value
242
+     * @param string $value
243 243
      * @return array
244 244
      * @throws \JSONText\Exceptions\JSONTextDataException
245 245
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
             return $this->returnAsType([]);
289 289
         }
290 290
 
291
-        $count = count($data) -1;
291
+        $count = count($data)-1;
292 292
         $key = array_keys($data)[$count];
293 293
         $val = array_values($data)[$count];
294 294
 
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
                     return $result;
390 390
                 }
391 391
             }
392
-        } else if($expressionParamIsValid) {
392
+        } else if ($expressionParamIsValid) {
393 393
             $dbBackendInst = $this->createBackendInst($expression);
394 394
             if ($result = $dbBackendInst->matchOnExpr()) {
395 395
                 return $result;
Please login to merge, or discard this patch.
code/extensions/JSONTextExtension.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      * 
56 56
      * @return null
57 57
      */
58
-	public function onBeforeWrite()
58
+    public function onBeforeWrite()
59 59
     {
60 60
         parent::onBeforeWrite();
61 61
         
Please login to merge, or discard this patch.
tests/JSONTextExtensionTest.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@
 block discarded – undo
18 18
      * 
19 19
      * @var array
20 20
      */
21
-	protected $extraDataObjects = [
22
-		'JSONTextTestPage',
23
-	];
21
+    protected $extraDataObjects = [
22
+        'JSONTextTestPage',
23
+    ];
24 24
     
25 25
     /**
26 26
      * Is an exception thrown when no POSTed vars are available for
Please login to merge, or discard this patch.