@param $arguments

@throws \Exception

@return object
170756
public function callController($arguments)
    {
        $params = [];
        /*
        | Check if whether user trying to access module
        | If module we will setup module configuration
        | or else setup default MVC configurations
         */
        if (string_has($arguments[0], '::')) {
            $exp = string_split($arguments[0], '::');
            $this->setModuleConfiguration($exp);
        } else {
            $this->setUpControllerAndMethodName($arguments);
        }

        if (isset($arguments[1])) {
            $params = $arguments[1];
        }

        $args = (!is_array($params)) ? [$params] : $params;

        /*
        | Get the instance of controller from Cygnite Container
        | and inject all dependencies into controller dynamically.
        | It's cool! You can write powerful rest api using restful
        | routing
         */
        return $this->handleControllerDependencies($this->controllerWithNS, $this->method, $args);
    }
1352325
private static function getProcess(array $arguments)
    {
        $config = Config::getInstance();

        return new Process(
            array_merge(
                [$config->python, $config->youtubedl],
                $config->params,
                $arguments
            )
        );
    }
823735
public function invokeWith($arguments = [])
    {
        $this->closeRule();

        if (empty($this->rules)) {
            $defaultAnswerCallback = $this->defaultAnswerCallback;
            $defaultAnswerCallback($this);
            $this->closeRule();
        }

        if ($arguments instanceof Arguments) {
            $argumentsArray = $arguments->all();
        } else {
            $argumentsArray = $arguments;
            $arguments = new Arguments($arguments);
        }

        foreach ($this->rules as $rule) {
            if (
                $this->matcherVerifier
                    ->matches($rule->criteria(), $argumentsArray)
            ) {
                break;
            }
        }

        $answer = $rule->next();

        foreach ($answer->secondaryRequests() as $request) {
            $this->invoker->callWith(
                $request->callback(),
                $request->finalArguments($this->self, $arguments)
            );
        }

        $request = $answer->primaryRequest();

        return $this->invoker->callWith(
            $request->callback(),
            $request->finalArguments($this->self, $arguments)
        );
    }
144041
public static function init(...$arguments) {
		assert(!isset(self::$instance[static::class]), sprintf('Class "%s" already initialized.', get_class()));

		static::__static();
		$parameters = self::determineParameters($arguments);

		return new static(...$parameters);
	}
3535
public function where(array $arguments)
    {
        foreach ($arguments as $key => $value) {
            $this->params[$key] = $value;
        }

        return $this;
    }
175568
protected function process(array $arguments = [])
    {
        return new Process(
            array_merge([realpath($this->driver)], $arguments), null, $this->chromeEnvironment()
        );
    }
1279344
public static function getInstance(array $arguments)
    {
        if (in_array('-nc', $arguments) || in_array('--no-color', $arguments)) {
            return new VerboseLogger(static::getLogLevel($arguments));
        }

        return new ColoredVerboseLogger(static::getLogLevel($arguments));
    }
481241
public function findByPK($arguments)
    {
        $arguments = (array) $arguments;

        $args = [
            'primaryKey' => $this->getKeyName(),
            'args'       => $arguments,
        ];

        $fetch = $this->queryBuilder()->find('find', $args);

        if ($fetch instanceof Collection && empty($fetch->asArray())) {
            return $this->returnEmptyObject();
        }

        $this->setId($this->getKeyName(), array_shift($arguments));
        $this->{$this->getKeyName()} = $fetch[0]->{$this->getKeyName()};

        foreach ($fetch[0]->getAttributes() as $key => $value) {
            $this->{$key} = $value;
        }

        $this->assignPropertiesToModel($this->attributes);

        return $this;
    }
578982
public function _call($name, $arguments)
    {
        $object = $this->getObject();
		$callable = function() use ($name, $arguments, $object){
			if (!method_exists($object, $name)) {
				throw new \Exception('Unable to invoke method ' . $name . ' on object of class ' . get_class($object));
			}
			return call_user_func_array(array($object, $name), (array) $arguments);
		};
		return $this->breakScopeAndExecute($callable);
    }
887192
public function passthru(array $arguments = [])
    {
        passthru($this->getBin() . $this->prepareCommand($arguments), $exitCode);
        return $exitCode;
    }
837916
private function execute(array $arguments = []): ResponseInterface
    {
        ob_start();
        $level = ob_get_level();

        try {
            $return = call_user_func_array($this->callable, $arguments);

            if ($return instanceof ResponseInterface) {
                $response = $return;
                $return = '';
            } elseif (is_null($return)
                 || is_scalar($return)
                 || (is_object($return) && method_exists($return, '__toString'))
            ) {
                $responseFactory = $this->responseFactory ?: Factory::getResponseFactory();
                $response = $responseFactory->createResponse();
            } else {
                throw new UnexpectedValueException(
                    'The value returned must be scalar or an object with __toString method'
                );
            }

            while (ob_get_level() >= $level) {
                $return = ob_get_clean().$return;
            }

            $body = $response->getBody();

            if ($return !== '' && $body->isWritable()) {
                $body->write($return);
            }

            return $response;
        } catch (Exception $exception) {
            while (ob_get_level() >= $level) {
                ob_end_clean();
            }

            throw $exception;
        }
    }
369301
public function query(array $arguments = [])
    {
        $options = array_merge([
            'hierarchical' => 'threaded',
        ], $arguments);

        return $this->plugger
            ->setModel($this)
            ->setAdapter(Comment::class)
            ->plugIn(get_comments($options))
            ->getConnected();
    }
785273
public function invokeArguments(array $arguments)
    {
        $parsedArguments = $this->argumentParser->parse($arguments, $this->getParameters());

        return call_user_func_array($this->callable, $parsedArguments);
    }
89920
public function query(...$arguments) // don't define return type, so user can
    {
        $query       = $arguments[0] ?? '';
        $queryParams = $arguments[1] ?? null;

        try {
            return $this->vendor->getDatabase()->getLink()->getAgent()->query($query, $queryParams);
        } catch (\Exception $e) {
            $this->setFail($e);
            return null;
        }
    }
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);
    }
36812
protected function arguments(array $arguments = null)
    {
        return is_null($arguments)
            ? $this->arguments
            : ($this->arguments = $arguments);
    }
37415
private static function getArguments(array $arguments = [])
    {
        $args = [];

        foreach ($arguments as $argument) {
            $args[] = $argument instanceof self ? $argument->getMoney() : $argument;
        }

        return $args;
    }