@param $arguments

@return mixed
341094
private function findBy($arguments)
    {
        $results = $this->select('*')->where($arguments[0], $arguments[1], $arguments[2])->findAll();

        if (is_null($results)) {
            return self::cyrus()->returnEmptyObject();
        }

        return $results;
    }
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)
        );
    }
799971
protected function normalizeArguments(array $arguments)
    {
        if (count($arguments) === 2) {
            return [$arguments[0] => $arguments[1]];
        }

        if ($arguments[0] instanceof Arrayable) {
            return $arguments[0]->toArray();
        }

        if (! is_array($arguments[0])) {
            $arguments[0] = [$arguments[0]];
        }

        return $arguments[0];
    }
156229
private function getDefinitionsFromArguments(array $arguments)
    {
        $definitions = array();
        foreach ($arguments as $argument) {
            if (is_array($argument)) {
                $definitions = array_merge($definitions, $this->getDefinitionsFromArguments($argument));
            } elseif ($argument instanceof Definition) {
                $definitions = array_merge(
                    $definitions,
                    $this->getInlinedDefinitions($argument),
                    array($argument)
                );
            }
        }

        return $definitions;
    }
44690
public function query(array $arguments = [])
    {
        return $this->plugger
            ->setModel($this)
            ->setAdapter(User::class)
            ->plugIn(get_users($arguments))
            ->getConnected();
    }
1372085
public function split(array $arguments = array()) {
		$splittedArguments = new AppendIterator();

		foreach ($this->_options['Period'] as $Date) {
			$_arguments = $arguments;
			$_arguments['--range'] = $Date->format(Configure::read('Task.dateFormat'));
			$splittedArguments->append($this->splitInner($_arguments));
		}

		return $splittedArguments;
	}
1084849
public static function normalizeVariadic(array $arguments)
    {
        if (count($arguments) === 2 && is_array($arguments[1])) {
            return array_merge(array($arguments[0]), $arguments[1]);
        }

        return $arguments;
    }
867377
public function blpop(...$arguments)
    {
        $result = $this->command('blpop', $arguments);

        return empty($result) ? null : $result;
    }
449053
protected function firstArgumentCorrespondsToPolicy(array $arguments)
    {
        if (! isset($arguments[0])) {
            return false;
        }

        $argument = $arguments[0];

        if (is_object($argument)) {
            $class = get_class($argument);

            return isset($this->policies[$class]);
        }

        return is_string($argument) && isset($this->policies[$argument]);
    }
967031
private function formatArguments($arguments)
    {
        return collect($arguments)->map(function ($argument) {
            return $argument instanceof Model ? FormatModel::given($argument) : $argument;
        })->toArray();
    }
818229
private function executeMethod(array $arguments)
    {
        if ($this->reflection->isStatic()) {
            return $this->reflection->invokeArgs(null, $arguments);
        } elseif (is_object($this->callback[0])) {
            return $this->reflection->invokeArgs($this->callback[0], $arguments);
        }
        $instance = new $this->callback[0]();
        return $this->reflection->invokeArgs($instance, $arguments);
    }
228667
public function count(...$arguments): ?int
    {
        $where       = $arguments[0] ?? null;
        $whereParams = $arguments[1] ?? null;

        $query = $this->initQueryBuilder();
        try {
            $query->select('1');

            if ($where != null) {
                $query->where($where, $whereParams);
            }

            return $query->count();
        } catch (\Exception $e) {
            $this->setFail($e);

            return null;
        }
    }
537469
private function getArguments($argsNumber, $arguments)
    {
        if ($argsNumber == 1 && is_string($arguments)) {
            return [$arguments];
        } elseif ($argsNumber === count($arguments)) {
            return $arguments;
        }

        for ($i = 0; $i < $argsNumber; $i++) {
            if (array_key_exists($i, $arguments)) {
                $args[] = $arguments[$i];
                continue;
            }

            return $args;
        }

        return [];
    }
1286956
public function executeOne($arguments = array())
    {
        $result = $this->execute($arguments);
        if (is_array($result) && count($result) > 0) {
            $result = $result[0];
        }
        return $result;
    }
280435
private function getMethodArgument($argument)
    {
        $arg = '__unknown__';
        if ($argument instanceof PyStringNode) {
            $arg = 'PyStringNode $string';
        } elseif ($argument instanceof TableNode) {
            $arg = 'TableNode $table';
        }

        return $arg;
    }
766271
protected function resolveArgumentsParameters(array $arguments)
    {
        foreach ($arguments as $argument => &$value) {
            if (is_string($value) === false || preg_match('/%[\S_\-]+%/', $value, $matches) === false) {
                continue;
            }

            $name = $matches[0];

            if (array_key_exists($name, $this->parameters) === false) {
                continue;
            }

            if (is_string($this->parameters[$name])) {
                $value = str_replace($name, $this->parameters[$name], (string) $value);

                continue;
            }

            $value = $this->parameters[$name];
        }

        return $arguments;
    }
723560
public static function convert(array $arguments)
    {
        if (!$arguments) {
            return [];
        }

        // always try convert the first argument to the field operand
        $field = self::toField(array_shift($arguments));

        if (!$arguments) {
            return [$field];
        }

        // always try convert the last argument to the value operand
        $value = self::toValue(array_pop($arguments));

        if (!$arguments) {
            return [$field, $value];
        }

        if (!self::isAllOperands($arguments)) {
            throw new NotConvertibleException('You passed arguments not all of which are operands.');
        }

        array_unshift($arguments, $field);
        array_push($arguments, $value);

        return $arguments;
    }