Code Duplication    Length = 12-12 lines in 2 locations

lib/Drupal/Core/DependencyInjection/YamlFileLoader.php 1 location

@@ 186-197 (lines=12) @@
183
            $definition->setAbstract($service['abstract']);
184
        }
185
186
        if (isset($service['factory'])) {
187
            if (is_string($service['factory'])) {
188
                if (strpos($service['factory'], ':') !== false && strpos($service['factory'], '::') === false) {
189
                    $parts = explode(':', $service['factory']);
190
                    $definition->setFactory(array($this->resolveServices('@'.$parts[0]), $parts[1]));
191
                } else {
192
                    $definition->setFactory($service['factory']);
193
                }
194
            } else {
195
                $definition->setFactory(array($this->resolveServices($service['factory'][0]), $service['factory'][1]));
196
            }
197
        }
198
199
        if (isset($service['factory_class'])) {
200
            $definition->setFactoryClass($service['factory_class']);

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php 1 location

@@ 191-202 (lines=12) @@
188
            $definition->setAbstract($service['abstract']);
189
        }
190
191
        if (isset($service['factory'])) {
192
            if (is_string($service['factory'])) {
193
                if (strpos($service['factory'], ':') !== false && strpos($service['factory'], '::') === false) {
194
                    $parts = explode(':', $service['factory']);
195
                    $definition->setFactory(array($this->resolveServices('@'.$parts[0]), $parts[1]));
196
                } else {
197
                    $definition->setFactory($service['factory']);
198
                }
199
            } else {
200
                $definition->setFactory(array($this->resolveServices($service['factory'][0]), $service['factory'][1]));
201
            }
202
        }
203
204
        if (isset($service['factory_class'])) {
205
            trigger_error(sprintf('The "factory_class" key in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $file), E_USER_DEPRECATED);