|
@@ -97,7 +97,7 @@ discard block |
|
|
block discarded – undo |
|
97
|
97
|
$importFileName = $import['resource']; |
|
98
|
98
|
|
|
99
|
99
|
if (strpos($importFileName, '/') !== 0) { |
|
100
|
|
- $importFileName = dirname($this->fileName).'/'.$importFileName; |
|
|
100
|
+ $importFileName = dirname($this->fileName) . '/' . $importFileName; |
|
101
|
101
|
} |
|
102
|
102
|
|
|
103
|
103
|
$yamlDefinitionLoader = new self($importFileName); |
|
@@ -207,12 +207,12 @@ discard block |
|
|
block discarded – undo |
|
207
|
207
|
if (is_string($service['factory'])) { |
|
208
|
208
|
if (strpos($service['factory'], ':') !== false && strpos($service['factory'], '::') === false) { |
|
209
|
209
|
$parts = explode(':', $service['factory']); |
|
210
|
|
- $definition = new FactoryDefinition($id, $this->resolveServices('@'.$parts[0]), $parts[1]); |
|
|
210
|
+ $definition = new FactoryDefinition($id, $this->resolveServices('@' . $parts[0]), $parts[1]); |
|
211
|
211
|
} elseif (strpos($service['factory'], ':') !== false && strpos($service['factory'], '::') !== false) { |
|
212
|
212
|
$parts = explode('::', $service['factory']); |
|
213
|
213
|
$definition = new FactoryDefinition($id, $parts[0], $parts[1]); |
|
214
|
214
|
} else { |
|
215
|
|
- throw new InvalidArgumentException('A "factory" must be in the format "service_name:method_name" or "class_name::method_name".Got "'.$service['factory'].'"'); |
|
|
215
|
+ throw new InvalidArgumentException('A "factory" must be in the format "service_name:method_name" or "class_name::method_name".Got "' . $service['factory'] . '"'); |
|
216
|
216
|
} |
|
217
|
217
|
} else { |
|
218
|
218
|
$definition = new FactoryDefinition($id, $this->resolveServices($service['factory'][0]), $service['factory'][1]); |
|
@@ -357,9 +357,9 @@ discard block |
|
|
block discarded – undo |
|
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, '@?')) { |
|
@@ -367,7 +367,7 @@ discard block |
|
|
block discarded – undo |
|
367
|
367
|
} else { |
|
368
|
368
|
$value = substr($value, 1); |
|
369
|
369
|
if ('=' === substr($value, -1)) { |
|
370
|
|
- throw new InvalidArgumentException('Non-strict services (ending with "=") are not supported by YamlDefinitionLoader. This is a Symfony specific feature.'); } else { |
|
|
370
|
+ throw new InvalidArgumentException('Non-strict services (ending with "=") are not supported by YamlDefinitionLoader. This is a Symfony specific feature.'); } else { |
|
371
|
371
|
} |
|
372
|
372
|
return new Reference($value); |
|
373
|
373
|
} |