public function setWarningLevel($level = self::WARNING_LEVEL_DEFAULT)
    {
        if (!in_array($level, $this->availableWarningLevels)) {
            throw new Exception\InvalidArgumentException(sprintf(
                'The warning level "%s" is not available.',
                $level
            ));
        }

        $this->warningLevel = (string) $level;

        return $this;
    }