Code Duplication    Length = 3-3 lines in 2 locations

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php 2 locations

@@ 769-771 (lines=3) @@
766
767
                $class = $this->dumpValue($callable[0]);
768
                // If the class is a string we can optimize call_user_func away
769
                if (strpos($class, "'") === 0) {
770
                    return sprintf("        $return{$instantiation}%s::%s(%s);\n", $this->dumpLiteralClass($class), $callable[1], $arguments ? implode(', ', $arguments) : '');
771
                }
772
773
                return sprintf("        $return{$instantiation}call_user_func(array(%s, '%s')%s);\n", $this->dumpValue($callable[0]), $callable[1], $arguments ? ', '.implode(', ', $arguments) : '');
774
            }
@@ 782-784 (lines=3) @@
779
                $class = $this->dumpValue($definition->getFactoryClass(false));
780
781
                // If the class is a string we can optimize call_user_func away
782
                if (strpos($class, "'") === 0) {
783
                    return sprintf("        $return{$instantiation}%s::%s(%s);\n", $this->dumpLiteralClass($class), $definition->getFactoryMethod(false), $arguments ? implode(', ', $arguments) : '');
784
                }
785
786
                return sprintf("        $return{$instantiation}call_user_func(array(%s, '%s')%s);\n", $this->dumpValue($definition->getFactoryClass(false)), $definition->getFactoryMethod(false), $arguments ? ', '.implode(', ', $arguments) : '');
787
            }