@@ -350,7 +350,7 @@ |
||
| 350 | 350 | * |
| 351 | 351 | * @param string|array $value |
| 352 | 352 | * |
| 353 | - * @return array|string|Reference |
|
| 353 | + * @return \Interop\Container\Definition\ReferenceInterface |
|
| 354 | 354 | */ |
| 355 | 355 | private function resolveServices($value) |
| 356 | 356 | { |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $importFileName = $import['resource']; |
| 102 | 102 | |
| 103 | 103 | if (strpos($importFileName, '/') !== 0) { |
| 104 | - $importFileName = dirname($this->fileName).'/'.$importFileName; |
|
| 104 | + $importFileName = dirname($this->fileName) . '/' . $importFileName; |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | $yamlDefinitionLoader = new self($importFileName); |
@@ -210,12 +210,12 @@ discard block |
||
| 210 | 210 | if (is_string($service['factory'])) { |
| 211 | 211 | if (strpos($service['factory'], ':') !== false && strpos($service['factory'], '::') === false) { |
| 212 | 212 | $parts = explode(':', $service['factory']); |
| 213 | - $definition = new FactoryDefinition($id, $this->resolveServices('@'.$parts[0]), $parts[1]); |
|
| 213 | + $definition = new FactoryDefinition($id, $this->resolveServices('@' . $parts[0]), $parts[1]); |
|
| 214 | 214 | } else { |
| 215 | 215 | throw new InvalidArgumentException('Factory service declared in YamlDefinitionLoader must extend from a service (using the syntax "service_name:method_name". Call from a static class using the syntax "class_name::method_name" is not supported.'); |
| 216 | 216 | } |
| 217 | 217 | } else { |
| 218 | - $definition = new FactoryDefinition($id, $this->resolveServices('@'.$service['factory'][0]), $service['factory'][1]); |
|
| 218 | + $definition = new FactoryDefinition($id, $this->resolveServices('@' . $service['factory'][0]), $service['factory'][1]); |
|
| 219 | 219 | } |
| 220 | 220 | } |
| 221 | 221 | |
@@ -356,9 +356,9 @@ discard block |
||
| 356 | 356 | { |
| 357 | 357 | if (is_array($value)) { |
| 358 | 358 | return array_map(array($this, 'resolveServices'), $value); |
| 359 | - } elseif (is_string($value) && 0 === strpos($value, '@=')) { |
|
| 359 | + } elseif (is_string($value) && 0 === strpos($value, '@=')) { |
|
| 360 | 360 | throw new InvalidArgumentException('Expressions (starting by "@=") are not supported by YamlDefinitionLoader. This is a Symfony specific feature.'); |
| 361 | - } elseif (is_string($value) && 0 === strpos($value, '@')) { |
|
| 361 | + } elseif (is_string($value) && 0 === strpos($value, '@')) { |
|
| 362 | 362 | if (0 === strpos($value, '@@')) { |
| 363 | 363 | return substr($value, 1); |
| 364 | 364 | } elseif (0 === strpos($value, '@?')) { |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | } else { |
| 367 | 367 | $value = substr($value, 1); |
| 368 | 368 | if ('=' === substr($value, -1)) { |
| 369 | - throw new InvalidArgumentException('Non-strict services (ending with "=") are not supported by YamlDefinitionLoader. This is a Symfony specific feature.'); } else { |
|
| 369 | + throw new InvalidArgumentException('Non-strict services (ending with "=") are not supported by YamlDefinitionLoader. This is a Symfony specific feature.'); } else { |
|
| 370 | 370 | } |
| 371 | 371 | return new Reference($value); |
| 372 | 372 | } |