@param array $params

@return array
507998
public function getRows(array $params = [])
    {
        $query = $this->createQueryBuilder('pc');

        if (array_key_exists('idPlayer', $params)) {
            $query->where('pc.idPlayer= :idPlayer')
                ->setParameter('idPlayer', $params['idPlayer']);
        }

        if (array_key_exists('limit', $params)) {
            $query->setMaxResults($params['limit']);
        }

        if (array_key_exists('orderBy', $params)) {
            $query->orderBy($params['orderBy']['column'], $params['orderBy']['order']);
        }

        return $query->getQuery()->getResult();
    }
440650
private function getParams(array $params)
    {
        $result = [];
        foreach ($params as $name => $item) {
            $value = $item['value'];
            if ('collection' === $item['type']) {
                $value = $this->getParams($value);
            }

            $result[$name] = new PropertyParameter($name, $value, $item['type']);
        }

        return $result;
    }
1057129
public function resolveParams($params)
    {
        $resolved = array();

        foreach ($params as $param) {
            if ($param instanceof DescriptorInterface) {
                $resolved[] = $this->get($param->getName());

                continue;
            }

            $resolved[] = $param;
        }

        return $resolved;
    }
278950
private function parseResizeParams(array $params = []): array
    {
        $resizeParams = [];
        foreach ($params as $param) {
            \preg_match('/^('.\implode('|', $this->allowedResizeParams).')([0-9]+)$/', $param, $matches);
            if (isset($matches[1]) && isset($matches[2])) {
                $resizeParams[$matches[1]] = (int)$matches[2];

                if ($matches[1] == 'gs') {
                    $resizeParams[$matches[1]] = ((int)$matches[2] === 1);
                }
            }
        }
        return $resizeParams;
    }
1267215
protected function prepareParams(array $params)
    {
        $result = $params;

        foreach ($result as $key => $val) {
            if (is_bool($val)) {
                $result[$key] = $val ? 1 : 0;
            }
        }

        return $result;
    }
726073
public function setParams(array $params = [])
    {

        //Process Params
        $params = $this->processParams($params);

        //Set the params
        $this->params = $params;

        return $this;
    }
782128
public function getAll($params = [])
    {
        $result = $this->connection()->get($this->getEndpoint(), $params, true);

        return $this->collectionFromResult($result);
    }
395202
protected function cleanParams(array $params)
    {
        $values = [];
        foreach ($params as $name => $details) {
            $this->cleanValueFrom($name, $details['value'], $values);
        }

        return $values;
    }
1163808
private function getDateParams($params)
    {
        /**
         * @var \DateTime
         */
        $to = $this->dateContext;
        /**
         * @var \DateTime
         */
        $from = clone $to;
        $from->sub(new \DateInterval('PT4M'));
        $from->sub(new \DateInterval('PT59S'));

        $params['dateFrom'] = $from->format('Y-m-d H:i:s');

        $params['dateTo'] = $to->format('Y-m-d H:i:s');

        return $params;
    }
979913
protected function getQueryParams(array $params = []): string
    {
        if (empty($params)) {
            return '';
        }
        $query = $params['query'] ?? [];
        if (is_string($query)) {
            return $query;
        }
        return empty($query) ? '' : http_build_query($query);
    }
613805
public static function create(array $params = [])
    {
        $headers = new static();
        foreach ($params as $key => $value) {
            $headers->set($key, $value);
        }
        return $headers;
    }
580060
protected function getAccessTokenOptions(array $params)
    {
        $options = ['headers' => ['content-type' => 'application/json']];

        if (self::METHOD_POST === $this->getAccessTokenMethod()) {
            $options['body'] = json_encode($params);
        }

        return $options;
    }
1314795
public function getParamTokens(array $params)
    {
        foreach ($params as $k => $p) {
            if (is_array($p)) {
                $params[$k] = isset($p[2]) ? $p[2] : 0;
            }
        }

        return $params;
    }
457361
private function formatParams(array $params) {
        foreach ($params as $key => $value) {
            if (is_array($value)) {
                $params[$key] = implode(',', $value);
            } else if (is_bool($value)) {
                $params[$key] = $value ? 1 : 0;
            }
        }
        return $params;
    }
40456
public function getDataTypeParams(array $params)
    {
        $type = $this->getEloquentDataMethod();
        if (in_array($type, ['char', 'string']) && isset($params[0]) && ($length = intval($params[0])) > 0) {
            return [$length];
        }

        if (in_array($type, ['decimal', 'double', 'float'])
            && isset($params[0]) && ($length = intval($params[0])) > 0 && isset($params[1]) && ($decimal = intval($params[1])) > 0) {
            return [$length, $decimal];
        }

        if ($type == 'enum') {
            return $params;
        }

        return [];
    }
1054435
public function getAllParams(array $params)
    {
        $all = $this->defaults;

        if (isset($params['p'])) {
            foreach (explode(',', $params['p']) as $preset) {
                if (isset($this->presets[$preset])) {
                    $all = array_merge($all, $this->presets[$preset]);
                }
            }
        }

        return array_merge($all, $params);
    }
204239
protected function formatParameters(array $params)
    {
        $formatted = [];

        foreach ($params as $name => $value) {
            if (!in_array($name, ['member_count', 'room_limit', 'path', 'version_type'], true)) {
                continue;
            }

            if ('version_type' === $name && !in_array($value, ['develop', 'trial', 'release'], true)) {
                throw new InvalidArgumentException('Invalid value of attribute "version_type".');
            }

            $formatted[] = [
                'name' => $name,
                'value' => strval($value),
            ];
        }

        return $formatted;
    }