Completed
Push — 1.0 ( 8c16a7...9b05f3 )
by David
15:56
created
src/YamlDefinitionLoader.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             $importFileName = $import['resource'];
96 96
 
97 97
             if (strpos($importFileName, '/') !== 0) {
98
-                $importFileName = dirname($this->fileName).'/'.$importFileName;
98
+                $importFileName = dirname($this->fileName) . '/' . $importFileName;
99 99
             }
100 100
 
101 101
             $yamlDefinitionLoader = new self($importFileName);
@@ -208,12 +208,12 @@  discard block
 block discarded – undo
208 208
             if (is_string($service['factory'])) {
209 209
                 if (strpos($service['factory'], ':') !== false && strpos($service['factory'], '::') === false) {
210 210
                     $parts = explode(':', $service['factory']);
211
-                    $definition = new FactoryCallDefinition($this->resolveServices('@'.$parts[0]), $parts[1]);
211
+                    $definition = new FactoryCallDefinition($this->resolveServices('@' . $parts[0]), $parts[1]);
212 212
                 } elseif (strpos($service['factory'], ':') !== false && strpos($service['factory'], '::') !== false) {
213 213
                     $parts = explode('::', $service['factory']);
214 214
                     $definition = new FactoryCallDefinition($parts[0], $parts[1]);
215 215
                 } else {
216
-                    throw new InvalidArgumentException('A "factory" must be in the format "service_name:method_name" or "class_name::method_name".Got "'.$service['factory'].'"');
216
+                    throw new InvalidArgumentException('A "factory" must be in the format "service_name:method_name" or "class_name::method_name".Got "' . $service['factory'] . '"');
217 217
                 }
218 218
             } else {
219 219
                 $definition = new FactoryCallDefinition($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, '@?')) {
Please login to merge, or discard this patch.