Completed
Pull Request — master (#5)
by John
01:37
created
src/Processors/Scalar/IntegerProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /*
3 3
  * This file is part of the KleijnWeb\PhpApi\Hydrator package.
4 4
  *
Please login to merge, or discard this patch.
src/Processors/Scalar/BoolProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /*
3 3
  * This file is part of the KleijnWeb\PhpApi\Hydrator package.
4 4
  *
Please login to merge, or discard this patch.
src/Processors/Scalar/ScalarProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /*
3 3
  * This file is part of the KleijnWeb\PhpApi\Hydrator package.
4 4
  *
Please login to merge, or discard this patch.
src/Processors/Scalar/StringProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /*
3 3
  * This file is part of the KleijnWeb\PhpApi\Hydrator package.
4 4
  *
Please login to merge, or discard this patch.
src/Processors/Scalar/DateTimeProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /*
3 3
  * This file is part of the KleijnWeb\PhpApi\Hydrator package.
4 4
  *
Please login to merge, or discard this patch.
src/Processors/Object/StrictSimpleObjectProcessor.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /*
3 3
  * This file is part of the KleijnWeb\PhpApi\Hydrator package.
4 4
  *
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function hydrateObject(\stdClass $input)
24 24
     {
25
-        $object = (object)[];
25
+        $object = (object)[ ];
26 26
 
27 27
         /** @var ObjectSchema $objectSchema */
28 28
         $objectSchema = $this->schema;
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
          * @var Schema $propertySchema
33 33
          */
34 34
         foreach ($objectSchema->getPropertySchemas() as $name => $propertySchema) {
35
-            if (!isset($input->$name) && isset($this->defaults[$name])) {
36
-                $value = $this->defaults[$name];
35
+            if (!isset($input->$name) && isset($this->defaults[ $name ])) {
36
+                $value = $this->defaults[ $name ];
37 37
             } else {
38 38
                 $value = $input->$name;
39 39
             }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     protected function dehydrateObject($object): \stdClass
51 51
     {
52
-        $node = (object)[];
52
+        $node = (object)[ ];
53 53
         /** @var ObjectSchema $objectSchema */
54 54
         $objectSchema = $this->schema;
55 55
 
Please login to merge, or discard this patch.
src/Processors/Object/LooseSimpleObjectProcessor.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /*
3 3
  * This file is part of the KleijnWeb\PhpApi\Hydrator package.
4 4
  *
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function hydrateObject(\stdClass $input)
41 41
     {
42
-        $output = (object)[];
42
+        $output = (object)[ ];
43 43
 
44 44
         /** @var ObjectSchema $objectSchema */
45 45
         $objectSchema = $this->schema;
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
         /** @var Schema $propertySchema */
48 48
         foreach ($objectSchema->getPropertySchemas() as $name => $propertySchema) {
49 49
             if (!property_exists($input, $name)) {
50
-                if (!isset($this->defaults[$name])) {
50
+                if (!isset($this->defaults[ $name ])) {
51 51
                     continue;
52 52
                 }
53
-                $value = $this->defaults[$name];
53
+                $value = $this->defaults[ $name ];
54 54
             } else {
55 55
                 $value = $input->$name;
56 56
             }
@@ -76,13 +76,13 @@  discard block
 block discarded – undo
76 76
         $objectSchema = $this->schema;
77 77
 
78 78
         /** @var Schema[] $propertySchemas */
79
-        $propertySchemas = [];
79
+        $propertySchemas = [ ];
80 80
 
81 81
         $output = clone $input;
82 82
 
83 83
         foreach ($input as $name => $value) {
84 84
             if ($objectSchema->hasPropertySchema($name)) {
85
-                $propertySchemas[$name] = $objectSchema->getPropertySchema($name);
85
+                $propertySchemas[ $name ] = $objectSchema->getPropertySchema($name);
86 86
             } else {
87 87
                 $output->$name = $this->anyProcessor->dehydrate($value);
88 88
             }
Please login to merge, or discard this patch.
src/Processors/Object/ComplexTypeProcessor.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /*
3 3
  * This file is part of the KleijnWeb\PhpApi\Hydrator package.
4 4
  *
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     /**
24 24
      * @var \ReflectionProperty[]
25 25
      */
26
-    protected $reflectionProperties = [];
26
+    protected $reflectionProperties = [ ];
27 27
 
28 28
     /**
29 29
      * @var string
@@ -38,27 +38,27 @@  discard block
 block discarded – undo
38 38
 
39 39
         foreach ($this->reflector->getProperties() as $reflectionProperty) {
40 40
             $reflectionProperty->setAccessible(true);
41
-            $this->reflectionProperties[$reflectionProperty->getName()] = $reflectionProperty;
41
+            $this->reflectionProperties[ $reflectionProperty->getName() ] = $reflectionProperty;
42 42
         }
43 43
     }
44 44
 
45 45
 
46 46
     protected function dehydrateObject($object): \stdClass
47 47
     {
48
-        $node = (object)[];
48
+        $node = (object)[ ];
49 49
 
50 50
         /** @var ObjectSchema $objectSchema */
51 51
         $objectSchema = $this->schema;
52 52
 
53 53
         foreach ($objectSchema->getPropertySchemas() as $name => $propertySchema) {
54
-            if (!isset($this->reflectionProperties[$name])) {
55
-                if (!isset($this->defaults[$name])) {
54
+            if (!isset($this->reflectionProperties[ $name ])) {
55
+                if (!isset($this->defaults[ $name ])) {
56 56
                     continue;
57 57
                 }
58
-                $value = $this->defaults[$name];
58
+                $value = $this->defaults[ $name ];
59 59
             }
60 60
             else {
61
-                $value = $this->reflectionProperties[$name]->getValue($object);
61
+                $value = $this->reflectionProperties[ $name ]->getValue($object);
62 62
             }
63 63
 
64 64
             if ($this->shouldFilterOutputValue($objectSchema->getPropertySchema($name), $value)) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@
 block discarded – undo
56 56
                     continue;
57 57
                 }
58 58
                 $value = $this->defaults[$name];
59
-            }
60
-            else {
59
+            } else {
61 60
                 $value = $this->reflectionProperties[$name]->getValue($object);
62 61
             }
63 62
 
Please login to merge, or discard this patch.
src/Processors/Factory/StrictSimpleObjectFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /*
3 3
  * This file is part of the KleijnWeb\PhpApi\Hydrator package.
4 4
  *
Please login to merge, or discard this patch.