private function queryAddFieldList(string $type, array $value): string
    {
        $fieldList = [];

        $values = self::ENDPOINT_SINGLE === $type ? $this->valuesSingle : $this->valuesCollection;
        foreach ($value as $parameter) {
            if (!\in_array($parameter, $values, true)) {
                throw new \InvalidArgumentException(\sprintf(
                    'Field %s is not available in the field list for repository %s, try one of %s',
                    $parameter,
                    $this->name,
                    \implode(', ', $values)
                ));
            }

            $fieldList[] = $parameter;
        }

        return \implode(',', $fieldList);
    }
private function queryAddFieldList(string $type, array $value): string
    {
        $fieldList = [];

        $values = self::ENDPOINT_SINGLE === $type ? $this->valuesSingle : $this->valuesCollection;
        foreach ($value as $parameter) {
            if (!\in_array($parameter, $values, true)) {
                throw new \InvalidArgumentException(\sprintf(
                    'Field %s is not available in the field list for repository %s, try one of %s',
                    $parameter,
                    $this->name,
                    \implode(', ', $values)
                ));
            }

            $fieldList[] = $parameter;
        }

        return \implode(',', $fieldList);
    }
private function queryAddFieldList ( string $ type , array $ value ) : string { $ fieldList = [ ] ; $ values = self :: ENDPOINT_SINGLE === $ type ? $ this -> valuesSingle : $ this -> valuesCollection ; foreach ( $ value as $ parameter ) { if ( ! \ in_array ( $ parameter , $ values , true ) ) { throw new \ InvalidArgumentException ( \ sprintf ( 'Field %s is not available in the field list for repository %s, try one of %s' , $ parameter , $ this -> name , \ implode ( ', ' , $ values ) ) ) ; } $ fieldList [ ] = $ parameter ; } return \ implode ( ',' , $ fieldList ) ; }
Checks if the values are in the repository's field list and creates the URL string.

@param string $type
@param array  $value

@throws \InvalidArgumentException

@return string
Checks if the values are in the repository s field list and creates the URL string .