private static function imageTypeToExtension($type)
    {
        $type = (int)$type;

        switch ($type) {
            case 2:
                $format = 'JPEG';
                break;

            case 4:
                $format = 'PNG';
                break;

            default:
                $format = 'UNSUPPORTED';
        }
        return $format;
    }
private static function imageTypeToExtension($type)
    {
        $type = (int)$type;

        switch ($type) {
            case 2:
                $format = 'JPEG';
                break;

            case 4:
                $format = 'PNG';
                break;

            default:
                $format = 'UNSUPPORTED';
        }
        return $format;
    }
private static function imageTypeToExtension ( $ type ) { $ type = ( int ) $ type ; switch ( $ type ) { case 2 : $ format = 'JPEG' ; break ; case 4 : $ format = 'PNG' ; break ; default : $ format = 'UNSUPPORTED' ; } return $ format ; }
Convert Protobuf Image type to an image extension.

@param int $type

@return string
Convert Protobuf Image type to an image extension .