Completed
Push — master ( de83b5...750b74 )
by John
01:32
created
src/Processors/ArrayProcessor.php 1 patch
Spacing   +3 added lines, -3 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
  *
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             }
53 53
         }
54 54
 
55
-        return array_map(function ($value) {
55
+        return array_map(function($value) {
56 56
             return $this->itemsProcessor->hydrate($value);
57 57
         }, $value);
58 58
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function dehydrate($value)
65 65
     {
66
-        return array_map(function ($value) {
66
+        return array_map(function($value) {
67 67
             return $this->itemsProcessor->dehydrate($value);
68 68
         }, $value);
69 69
     }
Please login to merge, or discard this patch.
src/Processors/Factory/ScalarFactory.php 1 patch
Spacing   +3 added lines, -3 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
  *
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
             return null;
48 48
         }
49 49
 
50
-        if (!isset(self::$primitiveMap[$schema->getType()])) {
50
+        if (!isset(self::$primitiveMap[ $schema->getType() ])) {
51 51
             return null;
52 52
         }
53
-        $className = self::$primitiveMap[$schema->getType()];
53
+        $className = self::$primitiveMap[ $schema->getType() ];
54 54
 
55 55
         return $hydrator = new $className($schema);
56 56
     }
Please login to merge, or discard this patch.
src/Processors/Object/ComplexTypeProcessor.php 1 patch
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,26 +38,26 @@  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
             } else {
60
-                $value = $this->reflectionProperties[$name]->getValue($object);
60
+                $value = $this->reflectionProperties[ $name ]->getValue($object);
61 61
             }
62 62
 
63 63
             if ($this->shouldFilterOutputValue($objectSchema->getPropertySchema($name), $value)) {
Please login to merge, or discard this patch.