@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | $importFileName = $import['resource']; |
| 97 | 97 | |
| 98 | 98 | if (strpos($importFileName, '/') !== 0) { |
| 99 | - $importFileName = dirname($this->fileName).'/'.$importFileName; |
|
| 99 | + $importFileName = dirname($this->fileName) . '/' . $importFileName; |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | $yamlDefinitionLoader = new self($importFileName); |
@@ -209,12 +209,12 @@ discard block |
||
| 209 | 209 | if (is_string($service['factory'])) { |
| 210 | 210 | if (strpos($service['factory'], ':') !== false && strpos($service['factory'], '::') === false) { |
| 211 | 211 | $parts = explode(':', $service['factory']); |
| 212 | - $definition = new FactoryCallDefinition($id, $this->resolveServices('@'.$parts[0]), $parts[1]); |
|
| 212 | + $definition = new FactoryCallDefinition($id, $this->resolveServices('@' . $parts[0]), $parts[1]); |
|
| 213 | 213 | } elseif (strpos($service['factory'], ':') !== false && strpos($service['factory'], '::') !== false) { |
| 214 | 214 | $parts = explode('::', $service['factory']); |
| 215 | 215 | $definition = new FactoryCallDefinition($id, $parts[0], $parts[1]); |
| 216 | 216 | } else { |
| 217 | - throw new InvalidArgumentException('A "factory" must be in the format "service_name:method_name" or "class_name::method_name".Got "'.$service['factory'].'"'); |
|
| 217 | + throw new InvalidArgumentException('A "factory" must be in the format "service_name:method_name" or "class_name::method_name".Got "' . $service['factory'] . '"'); |
|
| 218 | 218 | } |
| 219 | 219 | } else { |
| 220 | 220 | $definition = new FactoryCallDefinition($id, $this->resolveServices($service['factory'][0]), $service['factory'][1]); |
@@ -357,9 +357,9 @@ discard block |
||
| 357 | 357 | { |
| 358 | 358 | if (is_array($value)) { |
| 359 | 359 | return array_map(array($this, 'resolveServices'), $value); |
| 360 | - } elseif (is_string($value) && 0 === strpos($value, '@=')) { |
|
| 360 | + } elseif (is_string($value) && 0 === strpos($value, '@=')) { |
|
| 361 | 361 | throw new InvalidArgumentException('Expressions (starting by "@=") are not supported by YamlDefinitionLoader. This is a Symfony specific feature.'); |
| 362 | - } elseif (is_string($value) && 0 === strpos($value, '@')) { |
|
| 362 | + } elseif (is_string($value) && 0 === strpos($value, '@')) { |
|
| 363 | 363 | if (0 === strpos($value, '@@')) { |
| 364 | 364 | return substr($value, 1); |
| 365 | 365 | } elseif (0 === strpos($value, '@?')) { |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | public static function buildDefinitionProvider(Discovery $discovery) |
| 24 | 24 | { |
| 25 | - // TODO: change method signature to DefinitionProviderInterface[] |
|
| 25 | + // TODO: change method signature to DefinitionProviderInterface[] |
|
| 26 | 26 | // Then foreach discovered yaml file, go! |
| 27 | 27 | } |
| 28 | 28 | } |