public function toPhpCode(string $containerVariable, array $usedVariables = array()): InlineEntryInterface
    {
        $dumpedArguments = ValueUtils::dumpArguments($this->methodArguments, $containerVariable, $usedVariables);
        $prependedCode = $dumpedArguments->getStatements();
        if ($this->factory instanceof ReferenceInterface) {
            $code = sprintf("%s->get(%s)->%s(%s)\n", $containerVariable, var_export($this->factory->getTarget(), true), $this->methodName, $dumpedArguments->getExpression());
        } else {
            $code = sprintf("%s::%s(%s)\n", '\\'.ltrim($this->factory, '\\'), $this->methodName, $dumpedArguments->getExpression());
        }

        return new InlineEntry($code, $prependedCode, $usedVariables);
    }
public function toPhpCode(string $containerVariable, array $usedVariables = array()): InlineEntryInterface
    {
        $dumpedArguments = ValueUtils::dumpArguments($this->methodArguments, $containerVariable, $usedVariables);
        $prependedCode = $dumpedArguments->getStatements();
        if ($this->factory instanceof ReferenceInterface) {
            $code = sprintf("%s->get(%s)->%s(%s)\n", $containerVariable, var_export($this->factory->getTarget(), true), $this->methodName, $dumpedArguments->getExpression());
        } else {
            $code = sprintf("%s::%s(%s)\n", '\\'.ltrim($this->factory, '\\'), $this->methodName, $dumpedArguments->getExpression());
        }

        return new InlineEntry($code, $prependedCode, $usedVariables);
    }
Returns an InlineEntryInterface object representing the PHP code necessary to generate
the container entry.

@param string $containerVariable The name of the variable that allows access to the container instance. For instance: "$container", or "$this->container"
@param array  $usedVariables     An array of variables that are already used and that should not be used when generating this code.

@return InlineEntryInterface