private static function validateErrorLevel(int $errorLevel) : void { if (!in_array($errorLevel, self::ERROR_LEVELS, true)) { throw new \InvalidArgumentException(sprintf('Error level must be one of "%s"', implode('", "', self::ERROR_LEVELS))); } }