public function limit(int $limit): self
    {
        if ($limit < 0) {
            throw new \InvalidArgumentException('Limit must be a non-negative integer');
        }

        $this->filter['limit'] = $limit;

        return $this;
    }
public function limit(int $limit): self
    {
        if ($limit < 0) {
            throw new \InvalidArgumentException('Limit must be a non-negative integer');
        }

        $this->filter['limit'] = $limit;

        return $this;
    }
public function limit ( int $ limit ) : self { if ( $ limit < 0 ) { throw new \ InvalidArgumentException ( 'Limit must be a non-negative integer' ) ; } $ this -> filter [ 'limit' ] = $ limit ; return $ this ; }
Sets the maximum number of Statements to return. The server side sets
the maximum number of results when this value is not set or when it is 0.

@throws \InvalidArgumentException if the limit is not a non-negative
integer
Sets the maximum number of Statements to return . The server side sets the maximum number of results when this value is not set or when it is 0 .