Completed
Push — 1.0 ( b01434...dbaadd )
by David
03:01
created
src/YamlDefinitionLoader.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 FactoryDefinition($id, $this->resolveServices('@'.$parts[0]), $parts[1]);
212
+                    $definition = new FactoryDefinition($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 FactoryDefinition($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 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, '@?')) {
Please login to merge, or discard this patch.