public static function getTypeName($type) { return isset(self::$names[$type]) ? self::$names[$type] : null; }
/** * @param \google\protobuf\FieldDescriptorProto $field * * @return string */ protected function getFieldTypeName(FieldDescriptorProto $field) { $type = $field->getType()->value(); $name = Field::getTypeName($type); return $name ?: 'unknown'; }