@param string $name
@param array  $arguments

@return mixed
199821
private function execute($name, array $arguments)
    {
        return $this->functions[$name]->call($this->mapper, $this->connection, $this->strategies, $this->environment, $arguments, []);
    }
1003252
public function onModule($name, $arguments)
    {
        // Look in registered modules
        $key = isset($this->registered[$name]) ? $name : '__DEFAULT__';

        if (!isset($this->registered[$key])) {
            throw new ModuleNotFoundException($name, __CLASS__);
        }

        return $this->registered[$key]->$name(...$arguments);
    }
505160
protected function setKey(string $name, array $arguments): string
    {
        $prefix = $this->cachePrefix($name);
        $cacheKey = sha1($prefix.serialize($arguments));
        $this->cacheKeys[$prefix] = $cacheKey;

        return $cacheKey;
    }
875836
public function executeCommand($image, $name, $arguments)
    {
        $name = \mb_convert_case($name[0], MB_CASE_UPPER) . \mb_substr($name, 1, \mb_strlen($name));

        $commandName = $this->getCommandClassName($name);
        $command = new $commandName($arguments);
        $command->execute($image);

        return $command;
    }
372173
public function run($name, array $arguments = [])
    {
        foreach ($this->getModules() as $module)
        {
            $instance = $this->getInstance($module);

            if ($this->hasMethod($instance, $name))
            {
                return call_user_func_array([$instance, $name], $arguments);
            }
        }

        throw new BadMethodCallException("Method {$name} does not exist");
    }
1168652
public static function getArgumentsForCall($name, $arguments): array
    {
        // uppercase the method name
        $name = strtoupper($name);

        if ($name === 'ANY') {
            // allowed any of the methods
            $name = self::ALLOWED_METHODS;
        } else if (! in_array($name, self::ALLOWED_METHODS)) {
            throw new InvalidArgumentException('Route::method must be one of: ' . implode(', ', self::ALLOWED_METHODS));
        }

        // add the name to the arguments
        array_unshift($arguments, $name);

        // return the arguments
        return $arguments;
    }
1250811
protected function newMethodSegment($name, array $arguments = [])
    {
        return $this->repositoryProvider->createRepository($this->newMethod($name, $arguments));
    }
442652
public function getArray($name)
    {
        return isset($this->arguments[$name]) ? $this->arguments[$name]->values() : [];
    }
889826
protected function buildTerminalObject($name, $arguments)
    {
        // Retrieve the parser for the current set of styles
        $parser = $this->style->parser($this->util->system);

        // Reset the styles
        $this->style->reset();

        // Execute the terminal object
        $this->router->settings($this->settings);
        $this->router->parser($parser);
        $this->router->output($this->output);
        $this->router->util($this->util);

        return $this->router->execute($name, $arguments);
    }
445774
protected function decodeReply($name, $response, array &$arguments = [])
    {
        // Smooth over differences between phpredis and standalone response
        switch ($name) {
            case '': // Minor optimization for multi-bulk replies
                break;
            case 'config':
            case 'hgetall':
                $keys = $values = [];
                $i = 0;
                foreach ($response as $v) {
                    if (++$i % 2 === 1) {
                        $keys[] = $v;
                    } else {
                        $values[] = $v;
                    }
                }

                $response = \count($keys) ? \array_combine($keys, $values) : [];
                break;
            case 'info':
                $lines = \explode("\r\n", \trim($response, "\r\n"));
                $response = [];
                foreach ($lines as $line) {
                    if (!$line || $line[0] === '#') {
                        continue;
                    }
                    [$key, $value] = \explode(':', $line, 2);
                    $response[$key] = $value;
                }
                break;
            case 'ttl':
                if ($response === -1) {
                    $response = false;
                }
                break;
            case 'hmget':
                if (\count($arguments) !== \count($response)) {
                    throw new RedisException('hmget arguments and response do not match: ' . \print_r($arguments,
                            true) . ' ' . \print_r($response, true));
                }
                // rehydrate results into key => value form
                $response = \array_combine($arguments, $response);
                break;
            case 'scan':
            case 'sscan':
                $arguments[0] = (int) $response[0];
                unset($response[0]);
                $response = empty($response[1]) ? [] : $response[1];
                break;
            case 'hscan':
            case 'zscan':
                $arguments[0] = (int) $response[0];
                unset($response[0]);
                $response = empty($response[1]) ? [] : $response[1];
                if (!empty($response) && \is_array($response)) {
                    $count = \count($response);
                    $out = [];
                    for ($i = 0; $i < $count; $i += 2) {
                        $out[$response[$i]] = $response[$i + 1];
                    }
                    $response = $out;
                }
                break;
            case 'zrangebyscore':
            case 'zrevrangebyscore':
            case 'zrange':
            case 'zrevrange':
                if (\in_array('withscores', $arguments, true)) {
                    // Map array of values into key=>score list like phpRedis does
                    $item = null;
                    $out = [];
                    foreach ($response as $value) {
                        if ($item === null) {
                            $item = $value;
                        } else {
                            // 2nd value is the score
                            $out[$item] = (float) $value;
                            $item = null;
                        }
                    }
                    $response = $out;
                }
                break;
        }

        return $response;
    }
499827
public function call($name, array $arguments = [])
    {
        $this->initSteps($name, $row, $last);
        $isCallable = is_callable($row);

        if (!$isCallable && !$last)
        {
            return $row;
        }

        return call_user_func_array(
            $isCallable ? $row : [$row, $last],
            (new Argument($this, $arguments))->get()
        );
    }
279497
public function __callProtectedMethod($name, $arguments = [])
    {
        try {
            $method = $this->__reflection()->getMethod($name);
        }
        catch(\Exception $e) {
            return next::caller();
        }

        $method->setAccessible(true);
        $result =  $method->invokeArgs($this, $arguments);
        $method->setAccessible(false);

        return $result;
    }
1103158
public function getArgument($name) {
        if (!$this->definition->hasArgument($name)) {
            throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
        }

        return isset($this->arguments[$name]) ? $this->arguments[$name] : $this->definition->getArgument($name)
            ->getDefault();
    }
304383
public function exportHelper($name, array $arguments = null)
    {
        $this->requireHelper($name);

        $code = $this->formatter->getDependencyStorage(
            $this->helperName($name)
        );
        if (!is_null($arguments)) {
            $code .= '('.implode(', ', $arguments).')';
        }

        return $code;
    }
522074
protected function getApi($id, $name, array $arguments = [])
    {
        if (!isset($this->container)) {
            throw new \RuntimeException(\sprintf('$container is not attribute of class "%s"', __CLASS__));
        }

        if (!$this->container->has($id)) {
            throw new ApiNotFoundException($name);
        }

        $api = $this->container->get($id);

        if ($arguments) {
            return \call_user_func_array([$api, $name], $arguments);
        }

        return $api;
    }
462518
protected function execute($name, $arguments, $message)
    {
        if (array_key_exists($name, $this->commands)) {
            return $this->commands[$name]->make($this->telegram, $arguments, $message);
        } elseif (array_key_exists($name, $this->commandAliases)) {
            return $this->commandAliases[$name]->make($this->telegram, $arguments, $message);
        } elseif ($command = collect($this->commands)->filter(function($command) use ($name){
            return $command instanceof $name;
        })->first()) {
            $command->make($this->telegram, $arguments, $message);
        } elseif (array_key_exists('help', $this->commands)) {
            return $this->commands['help']->make($this->telegram, $arguments, $message);
        }

        return 'Ok';
    }
982988
protected function getResults($name, $args)
    {
        if (method_exists($this->scope, $name)) {
            return call_user_func_array(array($this->scope, $name), $args);
        }

        return $this->scope->call($name, $args);
    }