private function setLimit($limit = self::NO_LIMIT)
    {
        if (! is_int($limit)) {
            throw new Exceptions\InvalidIntegerType(gettype($limit));
        }

        // A limit of 0 or less is useless, fallback to no limit
        if ($limit !== self::NO_LIMIT && $limit <= 0) {
            throw new Exceptions\PositiveIntegerRequired($limit);
        }

        $this->limit = $limit;
    }