public static function validateType($type)
    {
        if (!in_array($type, [self::TYPE_INFO, self::TYPE_SUCCESS, self::TYPE_WARNING, self::TYPE_ERROR])) {
            throw new \InvalidArgumentException('Invalid resource message type "%s".', $type);
        }
    }
public static function validateType($type)
    {
        if (!in_array($type, [self::TYPE_INFO, self::TYPE_SUCCESS, self::TYPE_WARNING, self::TYPE_ERROR])) {
            throw new \InvalidArgumentException('Invalid resource message type "%s".', $type);
        }
    }
public static function validateType ( $ type ) { if ( ! in_array ( $ type , [ self :: TYPE_INFO , self :: TYPE_SUCCESS , self :: TYPE_WARNING , self :: TYPE_ERROR ] ) ) { throw new \ InvalidArgumentException ( 'Invalid resource message type "%s".' , $ type ) ; } }
Validates the type.

@param string $type
@throws \InvalidArgumentException
Validates the type .