@param string  $name
@param mixed[] $arguments

@return O\MethodCallExpression
337731
protected function newMethod($name, array $arguments = [])
    {
        return O\Expression::methodCall(
                $this->expression,
                O\Expression::value($name),
                array_map([O\Expression::getType(), 'argument'], array_map([O\Expression::getType(), 'value'], $arguments))
        );
    }
131056
public static function debugLog(string $name, array $arguments)
    {
        $logger = Config::getLogger();
        if ($logger) {
            $logger->debug($name, $arguments);
        }
    }
524331
public function call(ExpandableInterface $object, $name, array $args)
    {
        if (!$this::exists($name)) {
            throw new \BadMethodCallException(sprintf(self::MSG_NO_EXTENSION_TOCALL, $name), 110);
        }
        
        $closure = $this->extensions->get($name);
        
        return call_user_func_array(\Closure::bind($closure, $object, get_class($object)), $args);
    }
572109
public static function __callstatic($method, $arguments) {

    	$route = new Route();

    	if(false === is_callable([$route, $method])) {
			return trigger_error(sprintf('Call to undefined method %s::%s', __CLASS__, $method), E_USER_ERROR);
    	}

    	$route = call_user_func_array([$route, $method], $arguments);

    	return $route;
    }
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);
    }
243841
public function call(Entity $entity, $name, array $arguments) {
		if(isset($this->calls[$name])) {
			array_unshift($arguments, $entity);
			return call_user_func_array($this->calls[$name], $arguments);
		}
		else {
			foreach($this->callsCatchAll as $behavior) {
				$processed = false;
				$res = call_user_func_array([$behavior, 'callCatchAll'], [$entity, $name, $arguments, &$processed]);
				if($processed)
					return $res;
			}

			throw new \Exception('Method '.$name.' does not exist for entity '.$this->entityClass);
		}
	}
1368060
protected function call($object, $name, array $arguments = [])
    {
        $start = microtime(true);

        $ret = call_user_func_array(array($object, $name), $arguments);

        $this->notifyEvent($name, $arguments, $ret, microtime(true) - $start);

        return $ret;
    }
1329645
public function _call($name, $arguments)
    {
        $object = $this->getObject();
    	try
    	{
			$method = new \ReflectionMethod($object, $name);
		} catch (\Exception $e)
		{
		    if (method_exists($object, '__call'))
		    {
		        return call_user_func_array(array($object, '__call'), (array) $arguments);
		    } else
		    {
                throw new \Exception('Unable to invoke method ' . $name . ' on object of class ' . get_class($object));
		    }
		    return null;
		}

		$method->setAccessible(true);
		return $method->invokeArgs($object, $arguments);
    }
1337756
public function resolveStatic(string $name, string $method, ...$args)
    {
        return $this->resolve($name . '::' . $method, ...$args);
    }
420031
protected function executeCommand($name, array $arguments)
    {
        $command = $this->client->createCommand($name, $arguments);

        return $this->client->executeCommand($command);
    }
81839
protected function parseCall(string $name, array $arguments): array
    {
        list($text, $style) = $arguments + ['', []];

        if (\stripos($name, 'bold') !== false) {
            $name   = \str_ireplace('bold', '', $name);
            $style += ['bold' => 1];
        }

        if (!\preg_match_all('/([b|B|f|F]g)?([A-Z][a-z]+)([^A-Z])?/', $name, $matches)) {
            return [\lcfirst($name) ?: 'line', $text, $style];
        }

        list($name, $style) = $this->buildStyle($name, $style, $matches);

        return [$name, $text, $style];
    }
10929
public function get($name, array $arguments = null)
    {
        $this->load();
        if ($arguments === null) {
            $arguments = [$this->env];
        }
        if (isset($this->config[$name])) {
            $entry = $this->config[$name];
            if (is_callable($entry)) {
                return $entry(...$arguments);
            } elseif (is_object($entry)) {
                return $entry;
            } else {
                $name = $entry;
            }
        }
        return new $name(...$arguments);
    }
50679
public function execute(string $name, ...$arguments): bool
    {

        $method = AssuranceMethod::make($this->object, $name);

        $callable = $method->getCallable();
        $expected = $method->getExpected();

        $response = call_user_func($callable, ...$arguments);

        return $expected === $response;
    }
59103
private function callRequestFor($name, $parameters)
    {
        if (! $this->getHttpManager()) {
            $httpClient = new GuzzleAdapter(new GuzzleClient());
            $this->setHttpManager(new HttpManager($httpClient, $this->getOptions()));
        }

        /** @var RequestInterface $request */
        $request = $this->{'get' . ucfirst($name) . 'Request'}();

        return $request->execute(
            $this->getHttpManager(),
            $this->getParameters($parameters)
        );
    }
1100756
public function addCriteria($name, $arguments = [])
    {
        if (method_exists($this, $name)) {
            $this->modelCriterias[$name] = $arguments;
        } else {
            Throw new \Exception('Criteria ' . $name . ' does not exist.');
        }

        return $this;
    }
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;
    }
518228
public function methods($name = [])
    {
        if (!func_num_args()) {
            return $this->_methods;
        }
        foreach ($name as $method => $returns) {
            if (is_callable($returns)) {
                $this->method($method, $returns);
            } elseif (is_array($returns)) {
                $stub = $this->method($method);
                call_user_func_array([$stub, 'andReturn'], $returns);
            } else {
                $error = "Stubbed method definition for `{$method}` must be a closure or an array of returned value(s).";
                throw new InvalidArgumentException($error);
            }
        }
    }