private function checkQueryResourceId(array $parameters, string $type): void
    {
        if (!$this->resourceId && $parameters['resource_id']) {
            throw new \InvalidArgumentException(\sprintf(
                'Trying to query with a resource ID, but the repository %s does not provide support for them',
                $this->name
            ));
        }
        if (self::ENDPOINT_SINGLE === $type && !$parameters['resource_id']) {
            throw new \InvalidArgumentException(\sprintf(
                'Trying to query a single element without providing a resource ID for repository %s',
                $this->name
            ));
        }
        if (self::ENPOINT_COLLECTION === $type && $parameters['resource_id']) {
            throw new \InvalidArgumentException(\sprintf(
                'Trying to query a collection element by providing a resource ID for repository %s',
                $this->name
            ));
        }
    }
private function checkQueryResourceId(array $parameters, string $type): void
    {
        if (!$this->resourceId && $parameters['resource_id']) {
            throw new \InvalidArgumentException(\sprintf(
                'Trying to query with a resource ID, but the repository %s does not provide support for them',
                $this->name
            ));
        }
        if (self::ENDPOINT_SINGLE === $type && !$parameters['resource_id']) {
            throw new \InvalidArgumentException(\sprintf(
                'Trying to query a single element without providing a resource ID for repository %s',
                $this->name
            ));
        }
        if (self::ENPOINT_COLLECTION === $type && $parameters['resource_id']) {
            throw new \InvalidArgumentException(\sprintf(
                'Trying to query a collection element by providing a resource ID for repository %s',
                $this->name
            ));
        }
    }
private function checkQueryResourceId ( array $ parameters , string $ type ) : void { if ( ! $ this -> resourceId && $ parameters [ 'resource_id' ] ) { throw new \ InvalidArgumentException ( \ sprintf ( 'Trying to query with a resource ID, but the repository %s does not provide support for them' , $ this -> name ) ) ; } if ( self :: ENDPOINT_SINGLE === $ type && ! $ parameters [ 'resource_id' ] ) { throw new \ InvalidArgumentException ( \ sprintf ( 'Trying to query a single element without providing a resource ID for repository %s' , $ this -> name ) ) ; } if ( self :: ENPOINT_COLLECTION === $ type && $ parameters [ 'resource_id' ] ) { throw new \ InvalidArgumentException ( \ sprintf ( 'Trying to query a collection element by providing a resource ID for repository %s' , $ this -> name ) ) ; } }
Finds possible problems with the presence of a resource ID, or lack thereof.

@param array  $parameters
@param string $type

@throws \InvalidArgumentException
Finds possible problems with the presence of a resource ID or lack thereof .