@@ -154,13 +154,13 @@ |
||
| 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 | ); |
@@ -21,7 +21,6 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -37,7 +37,7 @@ |
||
| 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) { |
@@ -34,7 +34,7 @@ |
||
| 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; |
@@ -34,8 +34,9 @@ |
||
| 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 | } |
@@ -54,7 +54,7 @@ |
||
| 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); |
@@ -59,7 +59,7 @@ |
||
| 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 | |
@@ -59,7 +59,7 @@ |
||
| 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 | |
@@ -35,7 +35,7 @@ |
||
| 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; |