public function setLimit($limit) : void
    {
        if ($limit === null) {
            $this->_limit = $limit;

            return;
        }

        if (is_int($limit) || is_numeric($limit)) {
            $limit = abs(intval($limit));
            $this->_limit = $limit === 0 ? null : $limit;

            return;
        }

        if (empty($limit)) {
            throw new InvalidArgumentException('Empty field type is not allowed: ' . $this->getName());
        }

        $this->_limit = $this->_extractLimit($limit);
    }