Completed
Pull Request — master (#490)
by Antoine
03:23
created
src/Bridge/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -154,13 +154,13 @@
 block discarded – undo
154 154
         }
155 155
 
156 156
         $container->getDefinition('api_platform.metadata.resource.name_collection_factory.yml')->addArgument(
157
-            array_filter($paths, function ($v) {
157
+            array_filter($paths, function($v) {
158 158
                 return preg_match('/\.yml$/', $v);
159 159
             })
160 160
         );
161 161
 
162 162
         $container->getDefinition('api_platform.metadata.resource.name_collection_factory.xml')->addArgument(
163
-            array_filter($paths, function ($v) {
163
+            array_filter($paths, function($v) {
164 164
                 return preg_match('/\.xml$/', $v);
165 165
             })
166 166
         );
Please login to merge, or discard this patch.
src/Metadata/Resource/ConfigurationMap.php 4 patches
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,6 @@  discard block
 block discarded – undo
21 21
     private $configurations;
22 22
 
23 23
     /**
24
-     * @param string[] $classes
25 24
      */
26 25
     public function __construct(array $configurations = [])
27 26
     {
@@ -40,6 +39,9 @@  discard block
 block discarded – undo
40 39
        $this->configurations[$key] = $value;
41 40
     }
42 41
 
42
+    /**
43
+     * @param string $key
44
+     */
43 45
     public function get($key) {
44 46
         return $this->configurations[$key] ?? false;
45 47
     }
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         if(isset($this->configurations[$key]))
38 38
             return;
39 39
 
40
-       $this->configurations[$key] = $value;
40
+        $this->configurations[$key] = $value;
41 41
     }
42 42
 
43 43
     public function get($key) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     public function add($key, $value)
36 36
     {
37
-        if(isset($this->configurations[$key]))
37
+        if (isset($this->configurations[$key]))
38 38
             return;
39 39
 
40 40
        $this->configurations[$key] = $value;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@
 block discarded – undo
34 34
      */
35 35
     public function add($key, $value)
36 36
     {
37
-        if(isset($this->configurations[$key]))
38
-            return;
37
+        if(isset($this->configurations[$key])) {
38
+                    return;
39
+        }
39 40
 
40 41
        $this->configurations[$key] = $value;
41 42
     }
Please login to merge, or discard this patch.
src/Metadata/Resource/Factory/YamlResourceMetadataFactory.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
             return $this->handleNotFound($parentResourceMetadata, $resourceClass);
55 55
         }
56 56
 
57
-         $metadata = $this->configurationMap->get($resourceClass);
57
+            $metadata = $this->configurationMap->get($resourceClass);
58 58
 
59 59
         if (!$metadata || count($metadata) === 0) {
60 60
             return $this->handleNotFound($parentResourceMetadata, $resourceClass);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
             return $this->handleNotFound($parentResourceMetadata, $resourceClass);
60 60
         }
61 61
 
62
-        if(!isset($metadata['shortName'])) {
62
+        if (!isset($metadata['shortName'])) {
63 63
             $metadata['shortName'] = $reflectionClass->name;
64 64
         }
65 65
 
Please login to merge, or discard this patch.
src/Metadata/Resource/Factory/XmlResourceMetadataFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
             return $this->handleNotFound($parentResourceMetadata, $resourceClass);
60 60
         }
61 61
 
62
-        if(!isset($metadata['shortName'])) {
62
+        if (!isset($metadata['shortName'])) {
63 63
             $metadata['shortName'] = $reflectionClass->name;
64 64
         }
65 65
 
Please login to merge, or discard this patch.
src/Metadata/Resource/Factory/XmlResourceNameCollectionFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      * @param ConfigurationMap                            $configurationMap
36 36
      * @param ResourceNameCollectionFactoryInterface|null $decorated
37 37
      */
38
-    public function __construct(array $paths, ConfigurationMap $configurationMap,  ResourceNameCollectionFactoryInterface $decorated = null)
38
+    public function __construct(array $paths, ConfigurationMap $configurationMap, ResourceNameCollectionFactoryInterface $decorated = null)
39 39
     {
40 40
         $this->xmlParser = new DOMDocument();
41 41
         $this->configurationMap = $configurationMap;
Please login to merge, or discard this patch.