Completed
Pull Request — master (#23)
by John
02:43
created
src/Description/Builder/OpenApiBuilder.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -8,13 +8,11 @@
 block discarded – undo
8 8
 
9 9
 namespace KleijnWeb\PhpApi\Descriptions\Description\Builder;
10 10
 
11
-use KleijnWeb\PhpApi\Descriptions\Description\ComplexType;
12 11
 use KleijnWeb\PhpApi\Descriptions\Description\Description;
13 12
 use KleijnWeb\PhpApi\Descriptions\Description\Operation;
14 13
 use KleijnWeb\PhpApi\Descriptions\Description\Parameter;
15 14
 use KleijnWeb\PhpApi\Descriptions\Description\Path;
16 15
 use KleijnWeb\PhpApi\Descriptions\Description\Response;
17
-use KleijnWeb\PhpApi\Descriptions\Description\Schema\ObjectSchema;
18 16
 use KleijnWeb\PhpApi\Descriptions\Description\Schema\Schema;
19 17
 use KleijnWeb\PhpApi\Descriptions\Description\Visitor\ClosureVisitor;
20 18
 use KleijnWeb\PhpApi\Descriptions\Description\Visitor\ClosureVisitorScope;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
         $description = new Description($paths, [], $host, $schemes, $extensions, $this->document);
47 47
 
48
-        $this->document->apply(function ($composite, $attribute, $parent, $parentAttribute) use (&$typeSchemas) {
48
+        $this->document->apply(function($composite, $attribute, $parent, $parentAttribute) use (&$typeSchemas) {
49 49
             if ($composite instanceof \stdClass) {
50 50
                 if ($parentAttribute === 'definitions') {
51 51
                     $this->schemaFactory->create($composite, $attribute);
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             $this->schemaFactory->setClassNameResolver($this->classNameResolver);
58 58
             $types = $this->schemaFactory->resolveTypes();
59 59
 
60
-            $description->accept(new ClosureVisitor($description, function () use ($types) {
60
+            $description->accept(new ClosureVisitor($description, function() use ($types) {
61 61
                 /** @noinspection PhpUndefinedFieldInspection */
62 62
                 $this->complexTypes = $types;
63 63
             }));
Please login to merge, or discard this patch.
src/Description/Schema/SchemaFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@
 block discarded – undo
159 159
             }
160 160
         }
161 161
 
162
-        return array_map(function(ObjectSchema $schema){
162
+        return array_map(function(ObjectSchema $schema) {
163 163
             return $schema->getComplexType();
164 164
         }, $this->typedSchemas);
165 165
     }
Please login to merge, or discard this patch.
src/Hydrator/Processors/Factory/ObjectFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
             }
46 46
 
47 47
             // Add schema of all children up to root
48
-            $descend = function (ComplexType $complexType) use (&$descend, $builder, $processor) {
48
+            $descend = function(ComplexType $complexType) use (&$descend, $builder, $processor) {
49 49
 
50 50
                 foreach ($complexType->getSchema()->getPropertySchemas() as $propertyName => $propertySchema) {
51 51
                     if ($propertySchema instanceof ObjectSchema && $propertySchema->getXType() !== null && !$propertySchema->hasComplexType()) {
Please login to merge, or discard this patch.
src/Hydrator/Processors/Object/ComplexTypeProcessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $lineage = [];
114 114
 
115 115
         // Determine lineage
116
-        $traverseUp = function (ComplexType $type) use (&$lineage, &$traverseUp) {
116
+        $traverseUp = function(ComplexType $type) use (&$lineage, &$traverseUp) {
117 117
 
118 118
             $lineage[] = $type;
119 119
             $parents   = $type->getParents();
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
         $lineage = array_reverse($lineage);
129 129
 
130
-        $applyProperties = function ($object, $node) use ($lineage) {
130
+        $applyProperties = function($object, $node) use ($lineage) {
131 131
             foreach ($lineage as $type) {
132 132
                 $className    = $type->getClassName();
133 133
                 $objectSchema = $type->getSchema();
Please login to merge, or discard this patch.