private function checkQueryRepositoryCompatibility(string $type): void
    {
        if (self::ENDPOINT_SINGLE === $type && !$this->urlSingle) {
            throw new \InvalidArgumentException(\sprintf(
                'Trying to perform a single-type query on repository %s, which supports only collection type',
                $this->name
            ));
        }
        if (self::ENPOINT_COLLECTION === $type && !$this->urlCollection) {
            throw new \InvalidArgumentException(\sprintf(
                'Trying to perform a collection-type query on repository %s, which supports only single type',
                $this->name
            ));
        }
    }
private function checkQueryRepositoryCompatibility(string $type): void
    {
        if (self::ENDPOINT_SINGLE === $type && !$this->urlSingle) {
            throw new \InvalidArgumentException(\sprintf(
                'Trying to perform a single-type query on repository %s, which supports only collection type',
                $this->name
            ));
        }
        if (self::ENPOINT_COLLECTION === $type && !$this->urlCollection) {
            throw new \InvalidArgumentException(\sprintf(
                'Trying to perform a collection-type query on repository %s, which supports only single type',
                $this->name
            ));
        }
    }
private function checkQueryRepositoryCompatibility ( string $ type ) : void { if ( self :: ENDPOINT_SINGLE === $ type && ! $ this -> urlSingle ) { throw new \ InvalidArgumentException ( \ sprintf ( 'Trying to perform a single-type query on repository %s, which supports only collection type' , $ this -> name ) ) ; } if ( self :: ENPOINT_COLLECTION === $ type && ! $ this -> urlCollection ) { throw new \ InvalidArgumentException ( \ sprintf ( 'Trying to perform a collection-type query on repository %s, which supports only single type' , $ this -> name ) ) ; } }
Checks that the given Query type is compatible with the Repository.

@param string $type

@throws \InvalidArgumentException
Checks that the given Query type is compatible with the Repository .