Completed
Pull Request — master (#490)
by Antoine
03:25
created
src/Bridge/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -153,11 +153,11 @@
 block discarded – undo
153 153
             $paths = array_merge($paths, glob($glob, GLOB_BRACE | GLOB_NOSORT));
154 154
         }
155 155
 
156
-        $yamlPaths = array_filter($paths, function ($v) {
156
+        $yamlPaths = array_filter($paths, function($v) {
157 157
             return preg_match('/\.yml$/', $v);
158 158
         });
159 159
 
160
-        $xmlPaths = array_filter($paths, function ($v) {
160
+        $xmlPaths = array_filter($paths, function($v) {
161 161
             return preg_match('/\.xml$/', $v);
162 162
         });
163 163
 
Please login to merge, or discard this patch.
src/Metadata/Resource/Factory/XmlResourceNameCollectionFactory.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,8 @@
 block discarded – undo
60 60
                 throw new \InvalidArgumentException(sprintf('XML Schema loaded from path %s is not valid! Errors: %s', realpath($path), implode("\n", $this->getXmlErrors($internalErrors))));
61 61
             }
62 62
 
63
-			libxml_clear_errors();
64
-			libxml_use_internal_errors($internalErrors);
63
+            libxml_clear_errors();
64
+            libxml_use_internal_errors($internalErrors);
65 65
 
66 66
             $xpath = new \DOMXpath($this->xmlParser);
67 67
 
Please login to merge, or discard this patch.
src/Metadata/Resource/Factory/XmlResourceMetadataFactory.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
                 throw new \InvalidArgumentException(sprintf('XML Schema loaded from path %s is not valid! Errors: %s', realpath($path), implode("\n", $this->getXmlErrors($internalErrors))));
71 71
             }
72 72
 
73
-			libxml_clear_errors();
74
-			libxml_use_internal_errors($internalErrors);
73
+            libxml_clear_errors();
74
+            libxml_use_internal_errors($internalErrors);
75 75
 
76 76
             $xpath = new \DOMXpath($this->xmlParser);
77 77
 
@@ -95,22 +95,22 @@  discard block
 block discarded – undo
95 95
         }
96 96
 
97 97
         $metadata = [
98
-          'shortName' => $metadata->getAttribute('shortName') ?: null,
99
-          'description' => $metadata->getAttribute('description') ?: null,
100
-          'iri' => $metadata->getAttribute('iri') ?: null,
101
-          'itemOperations' => $this->getOperations($xpath->query('./itemOperations/operation', $metadata)) ?: null,
102
-          'collectionOperations' => $this->getOperations($xpath->query('./collectionOperations/operation', $metadata)) ?: null,
103
-          'attributes' => $this->getAttributes($xpath->query('./attributes/attribute', $metadata)) ?? [],
98
+            'shortName' => $metadata->getAttribute('shortName') ?: null,
99
+            'description' => $metadata->getAttribute('description') ?: null,
100
+            'iri' => $metadata->getAttribute('iri') ?: null,
101
+            'itemOperations' => $this->getOperations($xpath->query('./itemOperations/operation', $metadata)) ?: null,
102
+            'collectionOperations' => $this->getOperations($xpath->query('./collectionOperations/operation', $metadata)) ?: null,
103
+            'attributes' => $this->getAttributes($xpath->query('./attributes/attribute', $metadata)) ?? [],
104 104
         ];
105 105
 
106 106
         if (!$parentResourceMetadata) {
107 107
             return new ResourceMetadata(
108
-              $metadata['shortName'],
109
-              $metadata['description'],
110
-              $metadata['iri'],
111
-              $metadata['itemOperations'],
112
-              $metadata['collectionOperations'],
113
-              $metadata['attributes']
108
+                $metadata['shortName'],
109
+                $metadata['description'],
110
+                $metadata['iri'],
111
+                $metadata['itemOperations'],
112
+                $metadata['collectionOperations'],
113
+                $metadata['attributes']
114 114
             );
115 115
         }
116 116
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         foreach ($query as $operation) {
142 142
             $key = $operation->getAttribute('key');
143 143
             $operations[$key] = [
144
-          'method' => $operation->getAttribute('method'),
144
+            'method' => $operation->getAttribute('method'),
145 145
         ];
146 146
 
147 147
             $path = $operation->getAttribute('path');
Please login to merge, or discard this patch.