From 4595473d22e46a43936d7cc814b486544a8beb08 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Fri, 22 Nov 2024 09:24:20 -0800 Subject: [PATCH] update from master, add template phpdoc --- php/ext/google/protobuf/wkt.inc | 248 +++++++++--------- php/src/Google/Protobuf/Any.php | 2 +- php/src/Google/Protobuf/Api.php | 20 +- php/src/Google/Protobuf/BoolValue.php | 2 +- php/src/Google/Protobuf/BytesValue.php | 2 +- php/src/Google/Protobuf/DoubleValue.php | 2 +- php/src/Google/Protobuf/Duration.php | 2 +- php/src/Google/Protobuf/Enum.php | 14 +- php/src/Google/Protobuf/EnumValue.php | 8 +- php/src/Google/Protobuf/Field.php | 8 +- php/src/Google/Protobuf/FieldMask.php | 8 +- php/src/Google/Protobuf/FloatValue.php | 2 +- php/src/Google/Protobuf/GPBEmpty.php | 2 +- php/src/Google/Protobuf/Int32Value.php | 2 +- php/src/Google/Protobuf/Int64Value.php | 2 +- .../Protobuf/Internal/DescriptorProto.php | 50 ++-- .../DescriptorProto/ExtensionRange.php | 2 +- .../DescriptorProto/ReservedRange.php | 2 +- .../Protobuf/Internal/EnumDescriptorProto.php | 20 +- .../EnumDescriptorProto/EnumReservedRange.php | 2 +- .../Google/Protobuf/Internal/EnumOptions.php | 8 +- .../Internal/EnumValueDescriptorProto.php | 2 +- .../Protobuf/Internal/EnumValueOptions.php | 8 +- .../Internal/ExtensionRangeOptions.php | 14 +- .../ExtensionRangeOptions/Declaration.php | 2 +- .../Google/Protobuf/Internal/FeatureSet.php | 2 +- .../Protobuf/Internal/FeatureSetDefaults.php | 8 +- .../FeatureSetEditionDefault.php | 2 +- .../Internal/FieldDescriptorProto.php | 2 +- .../Google/Protobuf/Internal/FieldOptions.php | 20 +- .../Internal/FieldOptions/EditionDefault.php | 2 +- .../Internal/FieldOptions/FeatureSupport.php | 2 +- .../Protobuf/Internal/FileDescriptorProto.php | 44 ++-- .../Protobuf/Internal/FileDescriptorSet.php | 8 +- .../Google/Protobuf/Internal/FileOptions.php | 8 +- .../Protobuf/Internal/GeneratedCodeInfo.php | 8 +- .../Internal/GeneratedCodeInfo/Annotation.php | 8 +- .../Protobuf/Internal/MessageOptions.php | 8 +- .../Internal/MethodDescriptorProto.php | 2 +- .../Protobuf/Internal/MethodOptions.php | 8 +- .../Internal/OneofDescriptorProto.php | 2 +- .../Google/Protobuf/Internal/OneofOptions.php | 8 +- .../Internal/ServiceDescriptorProto.php | 8 +- .../Protobuf/Internal/ServiceOptions.php | 8 +- .../Protobuf/Internal/SourceCodeInfo.php | 8 +- .../Internal/SourceCodeInfo/Location.php | 20 +- .../Protobuf/Internal/UninterpretedOption.php | 8 +- .../Internal/UninterpretedOption/NamePart.php | 2 +- php/src/Google/Protobuf/ListValue.php | 8 +- php/src/Google/Protobuf/Method.php | 8 +- php/src/Google/Protobuf/Mixin.php | 2 +- php/src/Google/Protobuf/Option.php | 2 +- php/src/Google/Protobuf/RepeatedField.php | 11 +- php/src/Google/Protobuf/SourceContext.php | 2 +- php/src/Google/Protobuf/StringValue.php | 2 +- php/src/Google/Protobuf/Struct.php | 2 +- php/src/Google/Protobuf/Timestamp.php | 2 +- php/src/Google/Protobuf/Type.php | 20 +- php/src/Google/Protobuf/UInt32Value.php | 2 +- php/src/Google/Protobuf/UInt64Value.php | 2 +- php/src/Google/Protobuf/Value.php | 2 +- php/tests/GeneratedPhpdocTest.php | 16 +- .../protobuf/compiler/php/php_generator.cc | 2 +- 63 files changed, 356 insertions(+), 357 deletions(-) diff --git a/php/ext/google/protobuf/wkt.inc b/php/ext/google/protobuf/wkt.inc index a093995a61d3e..050a2a0b08707 100644 --- a/php/ext/google/protobuf/wkt.inc +++ b/php/ext/google/protobuf/wkt.inc @@ -12,8 +12,8 @@ static void google_protobuf_empty_proto_AddDescriptor(); static void google_protobuf_field_mask_proto_AddDescriptor(); static void google_protobuf_source_context_proto_AddDescriptor(); static void google_protobuf_struct_proto_AddDescriptor(); -static void google_protobuf_timestamp_proto_AddDescriptor(); static void google_protobuf_type_proto_AddDescriptor(); +static void google_protobuf_timestamp_proto_AddDescriptor(); static void google_protobuf_wrappers_proto_AddDescriptor(); /* google/protobuf/any.proto */ @@ -1497,127 +1497,6 @@ static void google_protobuf_NullValue_ModuleInit() { strlen("NULL_VALUE"), 0); } -/* google/protobuf/timestamp.proto */ - -zend_class_entry* GPBMetadata_Google_Protobuf_Timestamp_ce; - -const char google_protobuf_timestamp_proto_descriptor [239] = { -'\n', '\037', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'i', 'm', 'e', 's', 't', 'a', -'m', 'p', '.', 'p', 'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', -'\"', '+', '\n', '\t', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', '\022', '\017', '\n', '\007', 's', 'e', 'c', 'o', 'n', 'd', 's', '\030', -'\001', ' ', '\001', '(', '\003', '\022', '\r', '\n', '\005', 'n', 'a', 'n', 'o', 's', '\030', '\002', ' ', '\001', '(', '\005', 'B', '\205', '\001', '\n', '\023', -'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\016', 'T', 'i', 'm', 'e', -'s', 't', 'a', 'm', 'p', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', '2', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', -'n', 'g', '.', 'o', 'r', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'y', 'p', 'e', 's', '/', 'k', 'n', 'o', -'w', 'n', '/', 't', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'p', 'b', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002', -'\036', 'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'W', 'e', 'l', 'l', 'K', 'n', 'o', 'w', -'n', 'T', 'y', 'p', 'e', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', -}; - -static void google_protobuf_timestamp_proto_AddDescriptor() { - if (DescriptorPool_HasFile("google/protobuf/timestamp.proto")) return; - DescriptorPool_AddDescriptor("google/protobuf/timestamp.proto", google_protobuf_timestamp_proto_descriptor, - sizeof(google_protobuf_timestamp_proto_descriptor)); -} - -static PHP_METHOD(GPBMetadata_Google_Protobuf_Timestamp, initOnce) { - google_protobuf_timestamp_proto_AddDescriptor(); -} - -static zend_function_entry GPBMetadata_Google_Protobuf_Timestamp_methods[] = { - PHP_ME(GPBMetadata_Google_Protobuf_Timestamp, initOnce, arginfo_void, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - ZEND_FE_END -}; - -static void GPBMetadata_Google_Protobuf_Timestamp_ModuleInit() { - zend_class_entry tmp_ce; - - INIT_CLASS_ENTRY(tmp_ce, "GPBMetadata\\Google\\Protobuf\\Timestamp", - GPBMetadata_Google_Protobuf_Timestamp_methods); - - GPBMetadata_Google_Protobuf_Timestamp_ce = zend_register_internal_class(&tmp_ce); -} - -/* google_protobuf_Timestamp */ - -zend_class_entry* google_protobuf_Timestamp_ce; - -static PHP_METHOD(google_protobuf_Timestamp, __construct) { - google_protobuf_timestamp_proto_AddDescriptor(); - zim_Message___construct(INTERNAL_FUNCTION_PARAM_PASSTHRU); -} - -static PHP_METHOD(google_protobuf_Timestamp, getSeconds) { - Message* intern = (Message*)Z_OBJ_P(getThis()); - const upb_FieldDef *f = upb_MessageDef_FindFieldByName( - intern->desc->msgdef, "seconds"); - zval ret; - Message_get(intern, f, &ret); - RETURN_COPY_VALUE(&ret); -} - -static PHP_METHOD(google_protobuf_Timestamp, setSeconds) { - Message* intern = (Message*)Z_OBJ_P(getThis()); - const upb_FieldDef *f = upb_MessageDef_FindFieldByName( - intern->desc->msgdef, "seconds"); - zval *val; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &val) - == FAILURE) { - return; - } - Message_set(intern, f, val); - RETURN_COPY(getThis()); -} - -static PHP_METHOD(google_protobuf_Timestamp, getNanos) { - Message* intern = (Message*)Z_OBJ_P(getThis()); - const upb_FieldDef *f = upb_MessageDef_FindFieldByName( - intern->desc->msgdef, "nanos"); - zval ret; - Message_get(intern, f, &ret); - RETURN_COPY_VALUE(&ret); -} - -static PHP_METHOD(google_protobuf_Timestamp, setNanos) { - Message* intern = (Message*)Z_OBJ_P(getThis()); - const upb_FieldDef *f = upb_MessageDef_FindFieldByName( - intern->desc->msgdef, "nanos"); - zval *val; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &val) - == FAILURE) { - return; - } - Message_set(intern, f, val); - RETURN_COPY(getThis()); -} - -ZEND_BEGIN_ARG_INFO_EX(arginfo_timestamp_fromdatetime, 0, 0, 1) - ZEND_ARG_INFO(0, datetime) -ZEND_END_ARG_INFO() - -static zend_function_entry google_protobuf_Timestamp_phpmethods[] = { - PHP_ME(google_protobuf_Timestamp, __construct, arginfo_construct, ZEND_ACC_PUBLIC) - PHP_ME(google_protobuf_Timestamp, getSeconds, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(google_protobuf_Timestamp, setSeconds, arginfo_setter, ZEND_ACC_PUBLIC) - PHP_ME(google_protobuf_Timestamp, getNanos, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(google_protobuf_Timestamp, setNanos, arginfo_setter, ZEND_ACC_PUBLIC) - PHP_ME(google_protobuf_Timestamp, fromDateTime, arginfo_timestamp_fromdatetime, ZEND_ACC_PUBLIC) - PHP_ME(google_protobuf_Timestamp, toDateTime, arginfo_void, ZEND_ACC_PUBLIC) - ZEND_FE_END -}; - -static void google_protobuf_Timestamp_ModuleInit() { - zend_class_entry tmp_ce; - - INIT_CLASS_ENTRY(tmp_ce, "Google\\Protobuf\\Timestamp", - google_protobuf_Timestamp_phpmethods); - - google_protobuf_Timestamp_ce = zend_register_internal_class(&tmp_ce); - google_protobuf_Timestamp_ce->ce_flags |= ZEND_ACC_FINAL; - google_protobuf_Timestamp_ce->create_object = Message_create; - zend_do_inheritance(google_protobuf_Timestamp_ce, message_ce); -} - /* google/protobuf/type.proto */ zend_class_entry* GPBMetadata_Google_Protobuf_Type_ce; @@ -2757,6 +2636,127 @@ static void google_protobuf_Syntax_ModuleInit() { strlen("SYNTAX_EDITIONS"), 2); } +/* google/protobuf/timestamp.proto */ + +zend_class_entry* GPBMetadata_Google_Protobuf_Timestamp_ce; + +const char google_protobuf_timestamp_proto_descriptor [239] = { +'\n', '\037', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'i', 'm', 'e', 's', 't', 'a', +'m', 'p', '.', 'p', 'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'\"', '+', '\n', '\t', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', '\022', '\017', '\n', '\007', 's', 'e', 'c', 'o', 'n', 'd', 's', '\030', +'\001', ' ', '\001', '(', '\003', '\022', '\r', '\n', '\005', 'n', 'a', 'n', 'o', 's', '\030', '\002', ' ', '\001', '(', '\005', 'B', '\205', '\001', '\n', '\023', +'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\016', 'T', 'i', 'm', 'e', +'s', 't', 'a', 'm', 'p', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', '2', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', +'n', 'g', '.', 'o', 'r', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'y', 'p', 'e', 's', '/', 'k', 'n', 'o', +'w', 'n', '/', 't', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'p', 'b', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002', +'\036', 'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'W', 'e', 'l', 'l', 'K', 'n', 'o', 'w', +'n', 'T', 'y', 'p', 'e', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static void google_protobuf_timestamp_proto_AddDescriptor() { + if (DescriptorPool_HasFile("google/protobuf/timestamp.proto")) return; + DescriptorPool_AddDescriptor("google/protobuf/timestamp.proto", google_protobuf_timestamp_proto_descriptor, + sizeof(google_protobuf_timestamp_proto_descriptor)); +} + +static PHP_METHOD(GPBMetadata_Google_Protobuf_Timestamp, initOnce) { + google_protobuf_timestamp_proto_AddDescriptor(); +} + +static zend_function_entry GPBMetadata_Google_Protobuf_Timestamp_methods[] = { + PHP_ME(GPBMetadata_Google_Protobuf_Timestamp, initOnce, arginfo_void, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) + ZEND_FE_END +}; + +static void GPBMetadata_Google_Protobuf_Timestamp_ModuleInit() { + zend_class_entry tmp_ce; + + INIT_CLASS_ENTRY(tmp_ce, "GPBMetadata\\Google\\Protobuf\\Timestamp", + GPBMetadata_Google_Protobuf_Timestamp_methods); + + GPBMetadata_Google_Protobuf_Timestamp_ce = zend_register_internal_class(&tmp_ce); +} + +/* google_protobuf_Timestamp */ + +zend_class_entry* google_protobuf_Timestamp_ce; + +static PHP_METHOD(google_protobuf_Timestamp, __construct) { + google_protobuf_timestamp_proto_AddDescriptor(); + zim_Message___construct(INTERNAL_FUNCTION_PARAM_PASSTHRU); +} + +static PHP_METHOD(google_protobuf_Timestamp, getSeconds) { + Message* intern = (Message*)Z_OBJ_P(getThis()); + const upb_FieldDef *f = upb_MessageDef_FindFieldByName( + intern->desc->msgdef, "seconds"); + zval ret; + Message_get(intern, f, &ret); + RETURN_COPY_VALUE(&ret); +} + +static PHP_METHOD(google_protobuf_Timestamp, setSeconds) { + Message* intern = (Message*)Z_OBJ_P(getThis()); + const upb_FieldDef *f = upb_MessageDef_FindFieldByName( + intern->desc->msgdef, "seconds"); + zval *val; + if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &val) + == FAILURE) { + return; + } + Message_set(intern, f, val); + RETURN_COPY(getThis()); +} + +static PHP_METHOD(google_protobuf_Timestamp, getNanos) { + Message* intern = (Message*)Z_OBJ_P(getThis()); + const upb_FieldDef *f = upb_MessageDef_FindFieldByName( + intern->desc->msgdef, "nanos"); + zval ret; + Message_get(intern, f, &ret); + RETURN_COPY_VALUE(&ret); +} + +static PHP_METHOD(google_protobuf_Timestamp, setNanos) { + Message* intern = (Message*)Z_OBJ_P(getThis()); + const upb_FieldDef *f = upb_MessageDef_FindFieldByName( + intern->desc->msgdef, "nanos"); + zval *val; + if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &val) + == FAILURE) { + return; + } + Message_set(intern, f, val); + RETURN_COPY(getThis()); +} + +ZEND_BEGIN_ARG_INFO_EX(arginfo_timestamp_fromdatetime, 0, 0, 1) + ZEND_ARG_INFO(0, datetime) +ZEND_END_ARG_INFO() + +static zend_function_entry google_protobuf_Timestamp_phpmethods[] = { + PHP_ME(google_protobuf_Timestamp, __construct, arginfo_construct, ZEND_ACC_PUBLIC) + PHP_ME(google_protobuf_Timestamp, getSeconds, arginfo_void, ZEND_ACC_PUBLIC) + PHP_ME(google_protobuf_Timestamp, setSeconds, arginfo_setter, ZEND_ACC_PUBLIC) + PHP_ME(google_protobuf_Timestamp, getNanos, arginfo_void, ZEND_ACC_PUBLIC) + PHP_ME(google_protobuf_Timestamp, setNanos, arginfo_setter, ZEND_ACC_PUBLIC) + PHP_ME(google_protobuf_Timestamp, fromDateTime, arginfo_timestamp_fromdatetime, ZEND_ACC_PUBLIC) + PHP_ME(google_protobuf_Timestamp, toDateTime, arginfo_void, ZEND_ACC_PUBLIC) + ZEND_FE_END +}; + +static void google_protobuf_Timestamp_ModuleInit() { + zend_class_entry tmp_ce; + + INIT_CLASS_ENTRY(tmp_ce, "Google\\Protobuf\\Timestamp", + google_protobuf_Timestamp_phpmethods); + + google_protobuf_Timestamp_ce = zend_register_internal_class(&tmp_ce); + google_protobuf_Timestamp_ce->ce_flags |= ZEND_ACC_FINAL; + google_protobuf_Timestamp_ce->create_object = Message_create; + zend_do_inheritance(google_protobuf_Timestamp_ce, message_ce); +} + /* google/protobuf/wrappers.proto */ zend_class_entry* GPBMetadata_Google_Protobuf_Wrappers_ce; @@ -3278,8 +3278,6 @@ static void WellKnownTypes_ModuleInit() { google_protobuf_Value_ModuleInit(); google_protobuf_ListValue_ModuleInit(); google_protobuf_NullValue_ModuleInit(); - GPBMetadata_Google_Protobuf_Timestamp_ModuleInit(); - google_protobuf_Timestamp_ModuleInit(); GPBMetadata_Google_Protobuf_Type_ModuleInit(); google_protobuf_Type_ModuleInit(); google_protobuf_Field_ModuleInit(); @@ -3289,6 +3287,8 @@ static void WellKnownTypes_ModuleInit() { google_protobuf_EnumValue_ModuleInit(); google_protobuf_Option_ModuleInit(); google_protobuf_Syntax_ModuleInit(); + GPBMetadata_Google_Protobuf_Timestamp_ModuleInit(); + google_protobuf_Timestamp_ModuleInit(); GPBMetadata_Google_Protobuf_Wrappers_ModuleInit(); google_protobuf_DoubleValue_ModuleInit(); google_protobuf_FloatValue_ModuleInit(); diff --git a/php/src/Google/Protobuf/Any.php b/php/src/Google/Protobuf/Any.php index 2f245ca2f6130..3f8180832502f 100644 --- a/php/src/Google/Protobuf/Any.php +++ b/php/src/Google/Protobuf/Any.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * `Any` contains an arbitrary serialized protocol buffer message along with a diff --git a/php/src/Google/Protobuf/Api.php b/php/src/Google/Protobuf/Api.php index f39e81aab63f8..341c56984d862 100644 --- a/php/src/Google/Protobuf/Api.php +++ b/php/src/Google/Protobuf/Api.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Api is a light-weight descriptor for an API Interface. @@ -93,9 +93,9 @@ class Api extends \Google\Protobuf\Internal\Message * @type string $name * The fully qualified name of this interface, including package name * followed by the interface's simple name. - * @type array<\Google\Protobuf\Method>|\Google\Protobuf\Internal\RepeatedField $methods + * @type \Google\Protobuf\Method[] $methods * The methods of this interface, in unspecified order. - * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options + * @type \Google\Protobuf\Option[] $options * Any metadata attached to the interface. * @type string $version * A version string for this interface. If specified, must have the form @@ -118,7 +118,7 @@ class Api extends \Google\Protobuf\Internal\Message * @type \Google\Protobuf\SourceContext $source_context * Source context for the protocol buffer service represented by this * message. - * @type array<\Google\Protobuf\Mixin>|\Google\Protobuf\Internal\RepeatedField $mixins + * @type \Google\Protobuf\Mixin[] $mixins * Included interfaces. See [Mixin][]. * @type int $syntax * The source syntax of the service. @@ -161,7 +161,7 @@ public function setName($var) * The methods of this interface, in unspecified order. * * Generated from protobuf field repeated .google.protobuf.Method methods = 2; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Method> */ public function getMethods() { @@ -172,7 +172,7 @@ public function getMethods() * The methods of this interface, in unspecified order. * * Generated from protobuf field repeated .google.protobuf.Method methods = 2; - * @param array<\Google\Protobuf\Method>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Method[] $var * @return $this */ public function setMethods($var) @@ -187,7 +187,7 @@ public function setMethods($var) * Any metadata attached to the interface. * * Generated from protobuf field repeated .google.protobuf.Option options = 3; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Option> */ public function getOptions() { @@ -198,7 +198,7 @@ public function getOptions() * Any metadata attached to the interface. * * Generated from protobuf field repeated .google.protobuf.Option options = 3; - * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Option[] $var * @return $this */ public function setOptions($var) @@ -309,7 +309,7 @@ public function setSourceContext($var) * Included interfaces. See [Mixin][]. * * Generated from protobuf field repeated .google.protobuf.Mixin mixins = 6; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Mixin> */ public function getMixins() { @@ -320,7 +320,7 @@ public function getMixins() * Included interfaces. See [Mixin][]. * * Generated from protobuf field repeated .google.protobuf.Mixin mixins = 6; - * @param array<\Google\Protobuf\Mixin>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Mixin[] $var * @return $this */ public function setMixins($var) diff --git a/php/src/Google/Protobuf/BoolValue.php b/php/src/Google/Protobuf/BoolValue.php index 5c750a3cd33d0..144a36384aff2 100644 --- a/php/src/Google/Protobuf/BoolValue.php +++ b/php/src/Google/Protobuf/BoolValue.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Wrapper message for `bool`. diff --git a/php/src/Google/Protobuf/BytesValue.php b/php/src/Google/Protobuf/BytesValue.php index bf83507e214bc..407c6aea732df 100644 --- a/php/src/Google/Protobuf/BytesValue.php +++ b/php/src/Google/Protobuf/BytesValue.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Wrapper message for `bytes`. diff --git a/php/src/Google/Protobuf/DoubleValue.php b/php/src/Google/Protobuf/DoubleValue.php index 0b88e282750cb..f6797eb840963 100644 --- a/php/src/Google/Protobuf/DoubleValue.php +++ b/php/src/Google/Protobuf/DoubleValue.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Wrapper message for `double`. diff --git a/php/src/Google/Protobuf/Duration.php b/php/src/Google/Protobuf/Duration.php index f63169b121de1..62d7d876979a1 100644 --- a/php/src/Google/Protobuf/Duration.php +++ b/php/src/Google/Protobuf/Duration.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * A Duration represents a signed, fixed-length span of time represented diff --git a/php/src/Google/Protobuf/Enum.php b/php/src/Google/Protobuf/Enum.php index 4befa14de5cb3..296b0a019f246 100644 --- a/php/src/Google/Protobuf/Enum.php +++ b/php/src/Google/Protobuf/Enum.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Enum type definition. @@ -61,9 +61,9 @@ class Enum extends \Google\Protobuf\Internal\Message * * @type string $name * Enum type name. - * @type array<\Google\Protobuf\EnumValue>|\Google\Protobuf\Internal\RepeatedField $enumvalue + * @type \Google\Protobuf\EnumValue[] $enumvalue * Enum value definitions. - * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options + * @type \Google\Protobuf\Option[] $options * Protocol buffer options. * @type \Google\Protobuf\SourceContext $source_context * The source context. @@ -108,7 +108,7 @@ public function setName($var) * Enum value definitions. * * Generated from protobuf field repeated .google.protobuf.EnumValue enumvalue = 2; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\EnumValue> */ public function getEnumvalue() { @@ -119,7 +119,7 @@ public function getEnumvalue() * Enum value definitions. * * Generated from protobuf field repeated .google.protobuf.EnumValue enumvalue = 2; - * @param array<\Google\Protobuf\EnumValue>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\EnumValue[] $var * @return $this */ public function setEnumvalue($var) @@ -134,7 +134,7 @@ public function setEnumvalue($var) * Protocol buffer options. * * Generated from protobuf field repeated .google.protobuf.Option options = 3; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Option> */ public function getOptions() { @@ -145,7 +145,7 @@ public function getOptions() * Protocol buffer options. * * Generated from protobuf field repeated .google.protobuf.Option options = 3; - * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Option[] $var * @return $this */ public function setOptions($var) diff --git a/php/src/Google/Protobuf/EnumValue.php b/php/src/Google/Protobuf/EnumValue.php index 3914d285d47d7..a782640b8b090 100644 --- a/php/src/Google/Protobuf/EnumValue.php +++ b/php/src/Google/Protobuf/EnumValue.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Enum value definition. @@ -45,7 +45,7 @@ class EnumValue extends \Google\Protobuf\Internal\Message * Enum value name. * @type int $number * Enum value number. - * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options + * @type \Google\Protobuf\Option[] $options * Protocol buffer options. * } */ @@ -110,7 +110,7 @@ public function setNumber($var) * Protocol buffer options. * * Generated from protobuf field repeated .google.protobuf.Option options = 3; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Option> */ public function getOptions() { @@ -121,7 +121,7 @@ public function getOptions() * Protocol buffer options. * * Generated from protobuf field repeated .google.protobuf.Option options = 3; - * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Option[] $var * @return $this */ public function setOptions($var) diff --git a/php/src/Google/Protobuf/Field.php b/php/src/Google/Protobuf/Field.php index c2b635c60d957..405a2c0ad8464 100644 --- a/php/src/Google/Protobuf/Field.php +++ b/php/src/Google/Protobuf/Field.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * A single field of a message type. @@ -101,7 +101,7 @@ class Field extends \Google\Protobuf\Internal\Message * types. The first type has index 1; zero means the type is not in the list. * @type bool $packed * Whether to use alternative packed wire representation. - * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options + * @type \Google\Protobuf\Option[] $options * The protocol buffer options. * @type string $json_name * The field JSON name. @@ -304,7 +304,7 @@ public function setPacked($var) * The protocol buffer options. * * Generated from protobuf field repeated .google.protobuf.Option options = 9; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Option> */ public function getOptions() { @@ -315,7 +315,7 @@ public function getOptions() * The protocol buffer options. * * Generated from protobuf field repeated .google.protobuf.Option options = 9; - * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Option[] $var * @return $this */ public function setOptions($var) diff --git a/php/src/Google/Protobuf/FieldMask.php b/php/src/Google/Protobuf/FieldMask.php index 2661c307046b6..f0b734e6113a7 100644 --- a/php/src/Google/Protobuf/FieldMask.php +++ b/php/src/Google/Protobuf/FieldMask.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * `FieldMask` represents a set of symbolic field paths, for example: @@ -179,7 +179,7 @@ class FieldMask extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type array|\Google\Protobuf\Internal\RepeatedField $paths + * @type string[] $paths * The set of field mask paths. * } */ @@ -192,7 +192,7 @@ public function __construct($data = NULL) { * The set of field mask paths. * * Generated from protobuf field repeated string paths = 1; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField */ public function getPaths() { @@ -203,7 +203,7 @@ public function getPaths() * The set of field mask paths. * * Generated from protobuf field repeated string paths = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @param string[] $var * @return $this */ public function setPaths($var) diff --git a/php/src/Google/Protobuf/FloatValue.php b/php/src/Google/Protobuf/FloatValue.php index 90c79156c0dd9..b3c2c12c36a34 100644 --- a/php/src/Google/Protobuf/FloatValue.php +++ b/php/src/Google/Protobuf/FloatValue.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Wrapper message for `float`. diff --git a/php/src/Google/Protobuf/GPBEmpty.php b/php/src/Google/Protobuf/GPBEmpty.php index 24db6dc6770f6..e3a3e015c48b3 100644 --- a/php/src/Google/Protobuf/GPBEmpty.php +++ b/php/src/Google/Protobuf/GPBEmpty.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * A generic empty message that you can re-use to avoid defining duplicated diff --git a/php/src/Google/Protobuf/Int32Value.php b/php/src/Google/Protobuf/Int32Value.php index 98791408f3444..b344637e8dfaf 100644 --- a/php/src/Google/Protobuf/Int32Value.php +++ b/php/src/Google/Protobuf/Int32Value.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Wrapper message for `int32`. diff --git a/php/src/Google/Protobuf/Int64Value.php b/php/src/Google/Protobuf/Int64Value.php index cb83ba4854709..d55ebcffebcf9 100644 --- a/php/src/Google/Protobuf/Int64Value.php +++ b/php/src/Google/Protobuf/Int64Value.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Wrapper message for `int64`. diff --git a/php/src/Google/Protobuf/Internal/DescriptorProto.php b/php/src/Google/Protobuf/Internal/DescriptorProto.php index 6ce36334f9e54..8a5fefb6662c8 100644 --- a/php/src/Google/Protobuf/Internal/DescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/DescriptorProto.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Describes a message type. @@ -69,15 +69,15 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * @type array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $field - * @type array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $extension - * @type array<\Google\Protobuf\Internal\DescriptorProto>|\Google\Protobuf\Internal\RepeatedField $nested_type - * @type array<\Google\Protobuf\Internal\EnumDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $enum_type - * @type array<\Google\Protobuf\Internal\DescriptorProto\ExtensionRange>|\Google\Protobuf\Internal\RepeatedField $extension_range - * @type array<\Google\Protobuf\Internal\OneofDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $oneof_decl + * @type \Google\Protobuf\Internal\FieldDescriptorProto[] $field + * @type \Google\Protobuf\Internal\FieldDescriptorProto[] $extension + * @type \Google\Protobuf\Internal\DescriptorProto[] $nested_type + * @type \Google\Protobuf\Internal\EnumDescriptorProto[] $enum_type + * @type \Google\Protobuf\Internal\DescriptorProto\ExtensionRange[] $extension_range + * @type \Google\Protobuf\Internal\OneofDescriptorProto[] $oneof_decl * @type \Google\Protobuf\Internal\MessageOptions $options - * @type array<\Google\Protobuf\Internal\DescriptorProto\ReservedRange>|\Google\Protobuf\Internal\RepeatedField $reserved_range - * @type array|\Google\Protobuf\Internal\RepeatedField $reserved_name + * @type \Google\Protobuf\Internal\DescriptorProto\ReservedRange[] $reserved_range + * @type string[] $reserved_name * Reserved field names, which may not be used by fields in the same message. * A given name may only be reserved once. * } @@ -121,7 +121,7 @@ public function setName($var) /** * Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto field = 2; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\FieldDescriptorProto> */ public function getField() { @@ -130,7 +130,7 @@ public function getField() /** * Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto field = 2; - * @param array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\FieldDescriptorProto[] $var * @return $this */ public function setField($var) @@ -143,7 +143,7 @@ public function setField($var) /** * Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto extension = 6; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\FieldDescriptorProto> */ public function getExtension() { @@ -152,7 +152,7 @@ public function getExtension() /** * Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto extension = 6; - * @param array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\FieldDescriptorProto[] $var * @return $this */ public function setExtension($var) @@ -165,7 +165,7 @@ public function setExtension($var) /** * Generated from protobuf field repeated .google.protobuf.DescriptorProto nested_type = 3; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\DescriptorProto> */ public function getNestedType() { @@ -174,7 +174,7 @@ public function getNestedType() /** * Generated from protobuf field repeated .google.protobuf.DescriptorProto nested_type = 3; - * @param array<\Google\Protobuf\Internal\DescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\DescriptorProto[] $var * @return $this */ public function setNestedType($var) @@ -187,7 +187,7 @@ public function setNestedType($var) /** * Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto enum_type = 4; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\EnumDescriptorProto> */ public function getEnumType() { @@ -196,7 +196,7 @@ public function getEnumType() /** * Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto enum_type = 4; - * @param array<\Google\Protobuf\Internal\EnumDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\EnumDescriptorProto[] $var * @return $this */ public function setEnumType($var) @@ -209,7 +209,7 @@ public function setEnumType($var) /** * Generated from protobuf field repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\DescriptorProto\ExtensionRange> */ public function getExtensionRange() { @@ -218,7 +218,7 @@ public function getExtensionRange() /** * Generated from protobuf field repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - * @param array<\Google\Protobuf\Internal\DescriptorProto\ExtensionRange>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\DescriptorProto\ExtensionRange[] $var * @return $this */ public function setExtensionRange($var) @@ -231,7 +231,7 @@ public function setExtensionRange($var) /** * Generated from protobuf field repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\OneofDescriptorProto> */ public function getOneofDecl() { @@ -240,7 +240,7 @@ public function getOneofDecl() /** * Generated from protobuf field repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; - * @param array<\Google\Protobuf\Internal\OneofDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\OneofDescriptorProto[] $var * @return $this */ public function setOneofDecl($var) @@ -285,7 +285,7 @@ public function setOptions($var) /** * Generated from protobuf field repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\DescriptorProto\ReservedRange> */ public function getReservedRange() { @@ -294,7 +294,7 @@ public function getReservedRange() /** * Generated from protobuf field repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; - * @param array<\Google\Protobuf\Internal\DescriptorProto\ReservedRange>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\DescriptorProto\ReservedRange[] $var * @return $this */ public function setReservedRange($var) @@ -310,7 +310,7 @@ public function setReservedRange($var) * A given name may only be reserved once. * * Generated from protobuf field repeated string reserved_name = 10; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField */ public function getReservedName() { @@ -322,7 +322,7 @@ public function getReservedName() * A given name may only be reserved once. * * Generated from protobuf field repeated string reserved_name = 10; - * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @param string[] $var * @return $this */ public function setReservedName($var) diff --git a/php/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php b/php/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php index 387c6c78b1432..a2e142df1f409 100644 --- a/php/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php +++ b/php/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Generated from protobuf message google.protobuf.DescriptorProto.ExtensionRange diff --git a/php/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php b/php/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php index 63ff8604810ce..61a1e7be7976c 100644 --- a/php/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php +++ b/php/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Range of reserved tag numbers. Reserved tag numbers may not be used by diff --git a/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php b/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php index d0d22a2022dae..02864ed1be318 100644 --- a/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Describes an enum type. @@ -53,13 +53,13 @@ class EnumDescriptorProto extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * @type array<\Google\Protobuf\Internal\EnumValueDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $value + * @type \Google\Protobuf\Internal\EnumValueDescriptorProto[] $value * @type \Google\Protobuf\Internal\EnumOptions $options - * @type array<\Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange>|\Google\Protobuf\Internal\RepeatedField $reserved_range + * @type \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange[] $reserved_range * Range of reserved numeric values. Reserved numeric values may not be used * by enum values in the same enum declaration. Reserved ranges may not * overlap. - * @type array|\Google\Protobuf\Internal\RepeatedField $reserved_name + * @type string[] $reserved_name * Reserved enum value names, which may not be reused. A given name may only * be reserved once. * } @@ -103,7 +103,7 @@ public function setName($var) /** * Generated from protobuf field repeated .google.protobuf.EnumValueDescriptorProto value = 2; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\EnumValueDescriptorProto> */ public function getValue() { @@ -112,7 +112,7 @@ public function getValue() /** * Generated from protobuf field repeated .google.protobuf.EnumValueDescriptorProto value = 2; - * @param array<\Google\Protobuf\Internal\EnumValueDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\EnumValueDescriptorProto[] $var * @return $this */ public function setValue($var) @@ -161,7 +161,7 @@ public function setOptions($var) * overlap. * * Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange> */ public function getReservedRange() { @@ -174,7 +174,7 @@ public function getReservedRange() * overlap. * * Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; - * @param array<\Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange[] $var * @return $this */ public function setReservedRange($var) @@ -190,7 +190,7 @@ public function setReservedRange($var) * be reserved once. * * Generated from protobuf field repeated string reserved_name = 5; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField */ public function getReservedName() { @@ -202,7 +202,7 @@ public function getReservedName() * be reserved once. * * Generated from protobuf field repeated string reserved_name = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @param string[] $var * @return $this */ public function setReservedName($var) diff --git a/php/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php b/php/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php index 8c33acc3d51c8..b8234cf81a69a 100644 --- a/php/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php +++ b/php/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Range of reserved numeric values. Reserved values may not be used by diff --git a/php/src/Google/Protobuf/Internal/EnumOptions.php b/php/src/Google/Protobuf/Internal/EnumOptions.php index 71a952f85129b..f971465a5ed14 100644 --- a/php/src/Google/Protobuf/Internal/EnumOptions.php +++ b/php/src/Google/Protobuf/Internal/EnumOptions.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Generated from protobuf message google.protobuf.EnumOptions @@ -86,7 +86,7 @@ class EnumOptions extends \Google\Protobuf\Internal\Message * WARNING: This field should only be used by protobuf plugins or special * cases like the proto compiler. Other uses are discouraged and * developers should rely on the protoreflect APIs for their client language. - * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option + * @type \Google\Protobuf\Internal\UninterpretedOption[] $uninterpreted_option * The parser stores options it doesn't recognize here. See above. * } */ @@ -277,7 +277,7 @@ public function setFeatures($var) * The parser stores options it doesn't recognize here. See above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\UninterpretedOption> */ public function getUninterpretedOption() { @@ -288,7 +288,7 @@ public function getUninterpretedOption() * The parser stores options it doesn't recognize here. See above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\UninterpretedOption[] $var * @return $this */ public function setUninterpretedOption($var) diff --git a/php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php b/php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php index 822e1de59bdde..fce650fdb8cbe 100644 --- a/php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Describes a value within an enum. diff --git a/php/src/Google/Protobuf/Internal/EnumValueOptions.php b/php/src/Google/Protobuf/Internal/EnumValueOptions.php index 76af9882aca34..30cf2fa8985ff 100644 --- a/php/src/Google/Protobuf/Internal/EnumValueOptions.php +++ b/php/src/Google/Protobuf/Internal/EnumValueOptions.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Generated from protobuf message google.protobuf.EnumValueOptions @@ -77,7 +77,7 @@ class EnumValueOptions extends \Google\Protobuf\Internal\Message * credentials. * @type \Google\Protobuf\Internal\FieldOptions\FeatureSupport $feature_support * Information about the support window of a feature value. - * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option + * @type \Google\Protobuf\Internal\UninterpretedOption[] $uninterpreted_option * The parser stores options it doesn't recognize here. See above. * } */ @@ -250,7 +250,7 @@ public function setFeatureSupport($var) * The parser stores options it doesn't recognize here. See above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\UninterpretedOption> */ public function getUninterpretedOption() { @@ -261,7 +261,7 @@ public function getUninterpretedOption() * The parser stores options it doesn't recognize here. See above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\UninterpretedOption[] $var * @return $this */ public function setUninterpretedOption($var) diff --git a/php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php b/php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php index 2a969afb47737..4d85c3121c13f 100644 --- a/php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php +++ b/php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Generated from protobuf message google.protobuf.ExtensionRangeOptions @@ -51,9 +51,9 @@ class ExtensionRangeOptions extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option + * @type \Google\Protobuf\Internal\UninterpretedOption[] $uninterpreted_option * The parser stores options it doesn't recognize here. See above. - * @type array<\Google\Protobuf\Internal\ExtensionRangeOptions\Declaration>|\Google\Protobuf\Internal\RepeatedField $declaration + * @type \Google\Protobuf\Internal\ExtensionRangeOptions\Declaration[] $declaration * For external users: DO NOT USE. We are in the process of open sourcing * extension declaration and executing internal cleanups before it can be * used externally. @@ -74,7 +74,7 @@ public function __construct($data = NULL) { * The parser stores options it doesn't recognize here. See above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\UninterpretedOption> */ public function getUninterpretedOption() { @@ -85,7 +85,7 @@ public function getUninterpretedOption() * The parser stores options it doesn't recognize here. See above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\UninterpretedOption[] $var * @return $this */ public function setUninterpretedOption($var) @@ -102,7 +102,7 @@ public function setUninterpretedOption($var) * used externally. * * Generated from protobuf field repeated .google.protobuf.ExtensionRangeOptions.Declaration declaration = 2 [retention = RETENTION_SOURCE]; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\ExtensionRangeOptions\Declaration> */ public function getDeclaration() { @@ -115,7 +115,7 @@ public function getDeclaration() * used externally. * * Generated from protobuf field repeated .google.protobuf.ExtensionRangeOptions.Declaration declaration = 2 [retention = RETENTION_SOURCE]; - * @param array<\Google\Protobuf\Internal\ExtensionRangeOptions\Declaration>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\ExtensionRangeOptions\Declaration[] $var * @return $this */ public function setDeclaration($var) diff --git a/php/src/Google/Protobuf/Internal/ExtensionRangeOptions/Declaration.php b/php/src/Google/Protobuf/Internal/ExtensionRangeOptions/Declaration.php index 6e54295e2e197..632692118052b 100644 --- a/php/src/Google/Protobuf/Internal/ExtensionRangeOptions/Declaration.php +++ b/php/src/Google/Protobuf/Internal/ExtensionRangeOptions/Declaration.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Generated from protobuf message google.protobuf.ExtensionRangeOptions.Declaration diff --git a/php/src/Google/Protobuf/Internal/FeatureSet.php b/php/src/Google/Protobuf/Internal/FeatureSet.php index 4f354f1d07af2..021eb1e310c88 100644 --- a/php/src/Google/Protobuf/Internal/FeatureSet.php +++ b/php/src/Google/Protobuf/Internal/FeatureSet.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * TODO Enums in C++ gencode (and potentially other languages) are diff --git a/php/src/Google/Protobuf/Internal/FeatureSetDefaults.php b/php/src/Google/Protobuf/Internal/FeatureSetDefaults.php index 765c292a2615e..5e0e6e06537a2 100644 --- a/php/src/Google/Protobuf/Internal/FeatureSetDefaults.php +++ b/php/src/Google/Protobuf/Internal/FeatureSetDefaults.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * A compiled specification for the defaults of a set of features. These @@ -46,7 +46,7 @@ class FeatureSetDefaults extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type array<\Google\Protobuf\Internal\FeatureSetDefaults\FeatureSetEditionDefault>|\Google\Protobuf\Internal\RepeatedField $defaults + * @type \Google\Protobuf\Internal\FeatureSetDefaults\FeatureSetEditionDefault[] $defaults * @type int $minimum_edition * The minimum supported edition (inclusive) when this was constructed. * Editions before this will not have defaults. @@ -62,7 +62,7 @@ public function __construct($data = NULL) { /** * Generated from protobuf field repeated .google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\FeatureSetDefaults\FeatureSetEditionDefault> */ public function getDefaults() { @@ -71,7 +71,7 @@ public function getDefaults() /** * Generated from protobuf field repeated .google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; - * @param array<\Google\Protobuf\Internal\FeatureSetDefaults\FeatureSetEditionDefault>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\FeatureSetDefaults\FeatureSetEditionDefault[] $var * @return $this */ public function setDefaults($var) diff --git a/php/src/Google/Protobuf/Internal/FeatureSetDefaults/FeatureSetEditionDefault.php b/php/src/Google/Protobuf/Internal/FeatureSetDefaults/FeatureSetEditionDefault.php index 1b6259a5d94f6..d8b766c8b83f3 100644 --- a/php/src/Google/Protobuf/Internal/FeatureSetDefaults/FeatureSetEditionDefault.php +++ b/php/src/Google/Protobuf/Internal/FeatureSetDefaults/FeatureSetEditionDefault.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * A map from every known edition with a unique set of defaults to its diff --git a/php/src/Google/Protobuf/Internal/FieldDescriptorProto.php b/php/src/Google/Protobuf/Internal/FieldDescriptorProto.php index e493f53eb4dbd..f10018e7dbc77 100644 --- a/php/src/Google/Protobuf/Internal/FieldDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/FieldDescriptorProto.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Describes a field within a message. diff --git a/php/src/Google/Protobuf/Internal/FieldOptions.php b/php/src/Google/Protobuf/Internal/FieldOptions.php index 69b96b2596f81..0e6bff555965f 100644 --- a/php/src/Google/Protobuf/Internal/FieldOptions.php +++ b/php/src/Google/Protobuf/Internal/FieldOptions.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Generated from protobuf message google.protobuf.FieldOptions @@ -209,15 +209,15 @@ class FieldOptions extends \Google\Protobuf\Internal\Message * Indicate that the field value should not be printed out when using debug * formats, e.g. when the field contains sensitive credentials. * @type int $retention - * @type array|\Google\Protobuf\Internal\RepeatedField $targets - * @type array<\Google\Protobuf\Internal\FieldOptions\EditionDefault>|\Google\Protobuf\Internal\RepeatedField $edition_defaults + * @type int[] $targets + * @type \Google\Protobuf\Internal\FieldOptions\EditionDefault[] $edition_defaults * @type \Google\Protobuf\Internal\FeatureSet $features * Any features defined in the specific edition. * WARNING: This field should only be used by protobuf plugins or special * cases like the proto compiler. Other uses are discouraged and * developers should rely on the protoreflect APIs for their client language. * @type \Google\Protobuf\Internal\FieldOptions\FeatureSupport $feature_support - * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option + * @type \Google\Protobuf\Internal\UninterpretedOption[] $uninterpreted_option * The parser stores options it doesn't recognize here. See above. * } */ @@ -638,7 +638,7 @@ public function setRetention($var) /** * Generated from protobuf field repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField */ public function getTargets() { @@ -647,7 +647,7 @@ public function getTargets() /** * Generated from protobuf field repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19; - * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @param int[] $var * @return $this */ public function setTargets($var) @@ -660,7 +660,7 @@ public function setTargets($var) /** * Generated from protobuf field repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\FieldOptions\EditionDefault> */ public function getEditionDefaults() { @@ -669,7 +669,7 @@ public function getEditionDefaults() /** * Generated from protobuf field repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; - * @param array<\Google\Protobuf\Internal\FieldOptions\EditionDefault>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\FieldOptions\EditionDefault[] $var * @return $this */ public function setEditionDefaults($var) @@ -758,7 +758,7 @@ public function setFeatureSupport($var) * The parser stores options it doesn't recognize here. See above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\UninterpretedOption> */ public function getUninterpretedOption() { @@ -769,7 +769,7 @@ public function getUninterpretedOption() * The parser stores options it doesn't recognize here. See above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\UninterpretedOption[] $var * @return $this */ public function setUninterpretedOption($var) diff --git a/php/src/Google/Protobuf/Internal/FieldOptions/EditionDefault.php b/php/src/Google/Protobuf/Internal/FieldOptions/EditionDefault.php index 5acc9938afe56..a5804bade8db8 100644 --- a/php/src/Google/Protobuf/Internal/FieldOptions/EditionDefault.php +++ b/php/src/Google/Protobuf/Internal/FieldOptions/EditionDefault.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Generated from protobuf message google.protobuf.FieldOptions.EditionDefault diff --git a/php/src/Google/Protobuf/Internal/FieldOptions/FeatureSupport.php b/php/src/Google/Protobuf/Internal/FieldOptions/FeatureSupport.php index 63dfa7eebfb39..940c72302aec5 100644 --- a/php/src/Google/Protobuf/Internal/FieldOptions/FeatureSupport.php +++ b/php/src/Google/Protobuf/Internal/FieldOptions/FeatureSupport.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Information about the support window of a feature. diff --git a/php/src/Google/Protobuf/Internal/FileDescriptorProto.php b/php/src/Google/Protobuf/Internal/FileDescriptorProto.php index b01cf6e3072c3..840324625d7a5 100644 --- a/php/src/Google/Protobuf/Internal/FileDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/FileDescriptorProto.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Describes a complete .proto file. @@ -111,18 +111,18 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message * file name, relative to root of source tree * @type string $package * e.g. "foo", "foo.bar", etc. - * @type array|\Google\Protobuf\Internal\RepeatedField $dependency + * @type string[] $dependency * Names of files imported by this file. - * @type array|\Google\Protobuf\Internal\RepeatedField $public_dependency + * @type int[] $public_dependency * Indexes of the public imported files in the dependency list above. - * @type array|\Google\Protobuf\Internal\RepeatedField $weak_dependency + * @type int[] $weak_dependency * Indexes of the weak imported files in the dependency list. * For Google-internal migration only. Do not use. - * @type array<\Google\Protobuf\Internal\DescriptorProto>|\Google\Protobuf\Internal\RepeatedField $message_type + * @type \Google\Protobuf\Internal\DescriptorProto[] $message_type * All top-level definitions in this file. - * @type array<\Google\Protobuf\Internal\EnumDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $enum_type - * @type array<\Google\Protobuf\Internal\ServiceDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $service - * @type array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $extension + * @type \Google\Protobuf\Internal\EnumDescriptorProto[] $enum_type + * @type \Google\Protobuf\Internal\ServiceDescriptorProto[] $service + * @type \Google\Protobuf\Internal\FieldDescriptorProto[] $extension * @type \Google\Protobuf\Internal\FileOptions $options * @type \Google\Protobuf\Internal\SourceCodeInfo $source_code_info * This field contains optional information about the original source code. @@ -224,7 +224,7 @@ public function setPackage($var) * Names of files imported by this file. * * Generated from protobuf field repeated string dependency = 3; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField */ public function getDependency() { @@ -235,7 +235,7 @@ public function getDependency() * Names of files imported by this file. * * Generated from protobuf field repeated string dependency = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @param string[] $var * @return $this */ public function setDependency($var) @@ -250,7 +250,7 @@ public function setDependency($var) * Indexes of the public imported files in the dependency list above. * * Generated from protobuf field repeated int32 public_dependency = 10; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField */ public function getPublicDependency() { @@ -261,7 +261,7 @@ public function getPublicDependency() * Indexes of the public imported files in the dependency list above. * * Generated from protobuf field repeated int32 public_dependency = 10; - * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @param int[] $var * @return $this */ public function setPublicDependency($var) @@ -277,7 +277,7 @@ public function setPublicDependency($var) * For Google-internal migration only. Do not use. * * Generated from protobuf field repeated int32 weak_dependency = 11; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField */ public function getWeakDependency() { @@ -289,7 +289,7 @@ public function getWeakDependency() * For Google-internal migration only. Do not use. * * Generated from protobuf field repeated int32 weak_dependency = 11; - * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @param int[] $var * @return $this */ public function setWeakDependency($var) @@ -304,7 +304,7 @@ public function setWeakDependency($var) * All top-level definitions in this file. * * Generated from protobuf field repeated .google.protobuf.DescriptorProto message_type = 4; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\DescriptorProto> */ public function getMessageType() { @@ -315,7 +315,7 @@ public function getMessageType() * All top-level definitions in this file. * * Generated from protobuf field repeated .google.protobuf.DescriptorProto message_type = 4; - * @param array<\Google\Protobuf\Internal\DescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\DescriptorProto[] $var * @return $this */ public function setMessageType($var) @@ -328,7 +328,7 @@ public function setMessageType($var) /** * Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto enum_type = 5; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\EnumDescriptorProto> */ public function getEnumType() { @@ -337,7 +337,7 @@ public function getEnumType() /** * Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto enum_type = 5; - * @param array<\Google\Protobuf\Internal\EnumDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\EnumDescriptorProto[] $var * @return $this */ public function setEnumType($var) @@ -350,7 +350,7 @@ public function setEnumType($var) /** * Generated from protobuf field repeated .google.protobuf.ServiceDescriptorProto service = 6; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\ServiceDescriptorProto> */ public function getService() { @@ -359,7 +359,7 @@ public function getService() /** * Generated from protobuf field repeated .google.protobuf.ServiceDescriptorProto service = 6; - * @param array<\Google\Protobuf\Internal\ServiceDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\ServiceDescriptorProto[] $var * @return $this */ public function setService($var) @@ -372,7 +372,7 @@ public function setService($var) /** * Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto extension = 7; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\FieldDescriptorProto> */ public function getExtension() { @@ -381,7 +381,7 @@ public function getExtension() /** * Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto extension = 7; - * @param array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\FieldDescriptorProto[] $var * @return $this */ public function setExtension($var) diff --git a/php/src/Google/Protobuf/Internal/FileDescriptorSet.php b/php/src/Google/Protobuf/Internal/FileDescriptorSet.php index 6337846661b16..60d5f4bfba1be 100644 --- a/php/src/Google/Protobuf/Internal/FileDescriptorSet.php +++ b/php/src/Google/Protobuf/Internal/FileDescriptorSet.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * The protocol compiler can output a FileDescriptorSet containing the .proto @@ -30,7 +30,7 @@ class FileDescriptorSet extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type array<\Google\Protobuf\Internal\FileDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $file + * @type \Google\Protobuf\Internal\FileDescriptorProto[] $file * } */ public function __construct($data = NULL) { @@ -40,7 +40,7 @@ public function __construct($data = NULL) { /** * Generated from protobuf field repeated .google.protobuf.FileDescriptorProto file = 1; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\FileDescriptorProto> */ public function getFile() { @@ -49,7 +49,7 @@ public function getFile() /** * Generated from protobuf field repeated .google.protobuf.FileDescriptorProto file = 1; - * @param array<\Google\Protobuf\Internal\FileDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\FileDescriptorProto[] $var * @return $this */ public function setFile($var) diff --git a/php/src/Google/Protobuf/Internal/FileOptions.php b/php/src/Google/Protobuf/Internal/FileOptions.php index a130d5a67afac..91c94237a122c 100644 --- a/php/src/Google/Protobuf/Internal/FileOptions.php +++ b/php/src/Google/Protobuf/Internal/FileOptions.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Generated from protobuf message google.protobuf.FileOptions @@ -280,7 +280,7 @@ class FileOptions extends \Google\Protobuf\Internal\Message * WARNING: This field should only be used by protobuf plugins or special * cases like the proto compiler. Other uses are discouraged and * developers should rely on the protoreflect APIs for their client language. - * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option + * @type \Google\Protobuf\Internal\UninterpretedOption[] $uninterpreted_option * The parser stores options it doesn't recognize here. * See the documentation for the "Options" section above. * } @@ -1111,7 +1111,7 @@ public function setFeatures($var) * See the documentation for the "Options" section above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\UninterpretedOption> */ public function getUninterpretedOption() { @@ -1123,7 +1123,7 @@ public function getUninterpretedOption() * See the documentation for the "Options" section above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\UninterpretedOption[] $var * @return $this */ public function setUninterpretedOption($var) diff --git a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php index 0fe4a433b65af..6af52740bd91e 100644 --- a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php +++ b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Describes the relationship between generated code and its original source @@ -34,7 +34,7 @@ class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type array<\Google\Protobuf\Internal\GeneratedCodeInfo\Annotation>|\Google\Protobuf\Internal\RepeatedField $annotation + * @type \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation[] $annotation * An Annotation connects some span of text in generated code to an element * of its generating .proto file. * } @@ -49,7 +49,7 @@ public function __construct($data = NULL) { * of its generating .proto file. * * Generated from protobuf field repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\GeneratedCodeInfo\Annotation> */ public function getAnnotation() { @@ -61,7 +61,7 @@ public function getAnnotation() * of its generating .proto file. * * Generated from protobuf field repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; - * @param array<\Google\Protobuf\Internal\GeneratedCodeInfo\Annotation>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation[] $var * @return $this */ public function setAnnotation($var) diff --git a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php index 6a3b60c103213..a7fdb42e9fa12 100644 --- a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php +++ b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Generated from protobuf message google.protobuf.GeneratedCodeInfo.Annotation @@ -55,7 +55,7 @@ class Annotation extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type array|\Google\Protobuf\Internal\RepeatedField $path + * @type int[] $path * Identifies the element in the original source .proto file. This field * is formatted the same as SourceCodeInfo.Location.path. * @type string $source_file @@ -80,7 +80,7 @@ public function __construct($data = NULL) { * is formatted the same as SourceCodeInfo.Location.path. * * Generated from protobuf field repeated int32 path = 1 [packed = true]; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField */ public function getPath() { @@ -92,7 +92,7 @@ public function getPath() * is formatted the same as SourceCodeInfo.Location.path. * * Generated from protobuf field repeated int32 path = 1 [packed = true]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @param int[] $var * @return $this */ public function setPath($var) diff --git a/php/src/Google/Protobuf/Internal/MessageOptions.php b/php/src/Google/Protobuf/Internal/MessageOptions.php index 23ba7b4a25db9..d09e6fab50603 100644 --- a/php/src/Google/Protobuf/Internal/MessageOptions.php +++ b/php/src/Google/Protobuf/Internal/MessageOptions.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Generated from protobuf message google.protobuf.MessageOptions @@ -170,7 +170,7 @@ class MessageOptions extends \Google\Protobuf\Internal\Message * WARNING: This field should only be used by protobuf plugins or special * cases like the proto compiler. Other uses are discouraged and * developers should rely on the protoreflect APIs for their client language. - * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option + * @type \Google\Protobuf\Internal\UninterpretedOption[] $uninterpreted_option * The parser stores options it doesn't recognize here. See above. * } */ @@ -501,7 +501,7 @@ public function setFeatures($var) * The parser stores options it doesn't recognize here. See above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\UninterpretedOption> */ public function getUninterpretedOption() { @@ -512,7 +512,7 @@ public function getUninterpretedOption() * The parser stores options it doesn't recognize here. See above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\UninterpretedOption[] $var * @return $this */ public function setUninterpretedOption($var) diff --git a/php/src/Google/Protobuf/Internal/MethodDescriptorProto.php b/php/src/Google/Protobuf/Internal/MethodDescriptorProto.php index 93276e3930c85..59ab867812e8b 100644 --- a/php/src/Google/Protobuf/Internal/MethodDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/MethodDescriptorProto.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Describes a method of a service. diff --git a/php/src/Google/Protobuf/Internal/MethodOptions.php b/php/src/Google/Protobuf/Internal/MethodOptions.php index da27df21aa3c5..aae2a3d1705ae 100644 --- a/php/src/Google/Protobuf/Internal/MethodOptions.php +++ b/php/src/Google/Protobuf/Internal/MethodOptions.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Generated from protobuf message google.protobuf.MethodOptions @@ -62,7 +62,7 @@ class MethodOptions extends \Google\Protobuf\Internal\Message * WARNING: This field should only be used by protobuf plugins or special * cases like the proto compiler. Other uses are discouraged and * developers should rely on the protoreflect APIs for their client language. - * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option + * @type \Google\Protobuf\Internal\UninterpretedOption[] $uninterpreted_option * The parser stores options it doesn't recognize here. See above. * } */ @@ -191,7 +191,7 @@ public function setFeatures($var) * The parser stores options it doesn't recognize here. See above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\UninterpretedOption> */ public function getUninterpretedOption() { @@ -202,7 +202,7 @@ public function getUninterpretedOption() * The parser stores options it doesn't recognize here. See above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\UninterpretedOption[] $var * @return $this */ public function setUninterpretedOption($var) diff --git a/php/src/Google/Protobuf/Internal/OneofDescriptorProto.php b/php/src/Google/Protobuf/Internal/OneofDescriptorProto.php index da55bb4f42c50..16da70fa35aea 100644 --- a/php/src/Google/Protobuf/Internal/OneofDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/OneofDescriptorProto.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Describes a oneof. diff --git a/php/src/Google/Protobuf/Internal/OneofOptions.php b/php/src/Google/Protobuf/Internal/OneofOptions.php index 2d94ac48985b9..1d68a13aae2d4 100644 --- a/php/src/Google/Protobuf/Internal/OneofOptions.php +++ b/php/src/Google/Protobuf/Internal/OneofOptions.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Generated from protobuf message google.protobuf.OneofOptions @@ -43,7 +43,7 @@ class OneofOptions extends \Google\Protobuf\Internal\Message * WARNING: This field should only be used by protobuf plugins or special * cases like the proto compiler. Other uses are discouraged and * developers should rely on the protoreflect APIs for their client language. - * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option + * @type \Google\Protobuf\Internal\UninterpretedOption[] $uninterpreted_option * The parser stores options it doesn't recognize here. See above. * } */ @@ -98,7 +98,7 @@ public function setFeatures($var) * The parser stores options it doesn't recognize here. See above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\UninterpretedOption> */ public function getUninterpretedOption() { @@ -109,7 +109,7 @@ public function getUninterpretedOption() * The parser stores options it doesn't recognize here. See above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\UninterpretedOption[] $var * @return $this */ public function setUninterpretedOption($var) diff --git a/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php b/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php index bcc44f0e23243..27b274b2241e6 100644 --- a/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Describes a service. @@ -38,7 +38,7 @@ class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * @type array<\Google\Protobuf\Internal\MethodDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $method + * @type \Google\Protobuf\Internal\MethodDescriptorProto[] $method * @type \Google\Protobuf\Internal\ServiceOptions $options * } */ @@ -81,7 +81,7 @@ public function setName($var) /** * Generated from protobuf field repeated .google.protobuf.MethodDescriptorProto method = 2; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\MethodDescriptorProto> */ public function getMethod() { @@ -90,7 +90,7 @@ public function getMethod() /** * Generated from protobuf field repeated .google.protobuf.MethodDescriptorProto method = 2; - * @param array<\Google\Protobuf\Internal\MethodDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\MethodDescriptorProto[] $var * @return $this */ public function setMethod($var) diff --git a/php/src/Google/Protobuf/Internal/ServiceOptions.php b/php/src/Google/Protobuf/Internal/ServiceOptions.php index 56b44585a2cb2..d478bb2c3bd64 100644 --- a/php/src/Google/Protobuf/Internal/ServiceOptions.php +++ b/php/src/Google/Protobuf/Internal/ServiceOptions.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Generated from protobuf message google.protobuf.ServiceOptions @@ -57,7 +57,7 @@ class ServiceOptions extends \Google\Protobuf\Internal\Message * Depending on the target platform, this can emit Deprecated annotations * for the service, or it will be completely ignored; in the very least, * this is a formalization for deprecating services. - * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option + * @type \Google\Protobuf\Internal\UninterpretedOption[] $uninterpreted_option * The parser stores options it doesn't recognize here. See above. * } */ @@ -154,7 +154,7 @@ public function setDeprecated($var) * The parser stores options it doesn't recognize here. See above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\UninterpretedOption> */ public function getUninterpretedOption() { @@ -165,7 +165,7 @@ public function getUninterpretedOption() * The parser stores options it doesn't recognize here. See above. * * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\UninterpretedOption[] $var * @return $this */ public function setUninterpretedOption($var) diff --git a/php/src/Google/Protobuf/Internal/SourceCodeInfo.php b/php/src/Google/Protobuf/Internal/SourceCodeInfo.php index d6419f5a96543..b194a0416ea1d 100644 --- a/php/src/Google/Protobuf/Internal/SourceCodeInfo.php +++ b/php/src/Google/Protobuf/Internal/SourceCodeInfo.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Encapsulates information about the original source file from which a @@ -72,7 +72,7 @@ class SourceCodeInfo extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type array<\Google\Protobuf\Internal\SourceCodeInfo\Location>|\Google\Protobuf\Internal\RepeatedField $location + * @type \Google\Protobuf\Internal\SourceCodeInfo\Location[] $location * A Location identifies a piece of source code in a .proto file which * corresponds to a particular definition. This information is intended * to be useful to IDEs, code indexers, documentation generators, and similar @@ -165,7 +165,7 @@ public function __construct($data = NULL) { * be recorded in the future. * * Generated from protobuf field repeated .google.protobuf.SourceCodeInfo.Location location = 1; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\SourceCodeInfo\Location> */ public function getLocation() { @@ -216,7 +216,7 @@ public function getLocation() * be recorded in the future. * * Generated from protobuf field repeated .google.protobuf.SourceCodeInfo.Location location = 1; - * @param array<\Google\Protobuf\Internal\SourceCodeInfo\Location>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\SourceCodeInfo\Location[] $var * @return $this */ public function setLocation($var) diff --git a/php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php b/php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php index 5253dbc4ffd39..87d3452a147cd 100644 --- a/php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php +++ b/php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Generated from protobuf message google.protobuf.SourceCodeInfo.Location @@ -108,7 +108,7 @@ class Location extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type array|\Google\Protobuf\Internal\RepeatedField $path + * @type int[] $path * Identifies which part of the FileDescriptorProto was defined at this * location. * Each element is a field number or an index. They form a path from @@ -130,7 +130,7 @@ class Location extends \Google\Protobuf\Internal\Message * [ 4, 3, 2, 7 ] * this path refers to the whole field declaration (from the beginning * of the label to the terminating semicolon). - * @type array|\Google\Protobuf\Internal\RepeatedField $span + * @type int[] $span * Always has exactly three or four elements: start line, start column, * end line (optional, otherwise assumed same as start line), end column. * These are packed into a single field for efficiency. Note that line @@ -174,7 +174,7 @@ class Location extends \Google\Protobuf\Internal\Message * optional int32 grault = 6; * // ignored detached comments. * @type string $trailing_comments - * @type array|\Google\Protobuf\Internal\RepeatedField $leading_detached_comments + * @type string[] $leading_detached_comments * } */ public function __construct($data = NULL) { @@ -206,7 +206,7 @@ public function __construct($data = NULL) { * of the label to the terminating semicolon). * * Generated from protobuf field repeated int32 path = 1 [packed = true]; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField */ public function getPath() { @@ -237,7 +237,7 @@ public function getPath() * of the label to the terminating semicolon). * * Generated from protobuf field repeated int32 path = 1 [packed = true]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @param int[] $var * @return $this */ public function setPath($var) @@ -256,7 +256,7 @@ public function setPath($var) * 1 to each before displaying to a user. * * Generated from protobuf field repeated int32 span = 2 [packed = true]; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField */ public function getSpan() { @@ -271,7 +271,7 @@ public function getSpan() * 1 to each before displaying to a user. * * Generated from protobuf field repeated int32 span = 2 [packed = true]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @param int[] $var * @return $this */ public function setSpan($var) @@ -422,7 +422,7 @@ public function setTrailingComments($var) /** * Generated from protobuf field repeated string leading_detached_comments = 6; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField */ public function getLeadingDetachedComments() { @@ -431,7 +431,7 @@ public function getLeadingDetachedComments() /** * Generated from protobuf field repeated string leading_detached_comments = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @param string[] $var * @return $this */ public function setLeadingDetachedComments($var) diff --git a/php/src/Google/Protobuf/Internal/UninterpretedOption.php b/php/src/Google/Protobuf/Internal/UninterpretedOption.php index 156534e4f2247..b365b6c0cd654 100644 --- a/php/src/Google/Protobuf/Internal/UninterpretedOption.php +++ b/php/src/Google/Protobuf/Internal/UninterpretedOption.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * A message representing a option the parser does not recognize. This only @@ -61,7 +61,7 @@ class UninterpretedOption extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type array<\Google\Protobuf\Internal\UninterpretedOption\NamePart>|\Google\Protobuf\Internal\RepeatedField $name + * @type \Google\Protobuf\Internal\UninterpretedOption\NamePart[] $name * @type string $identifier_value * The value of the uninterpreted option, in whatever type the tokenizer * identified it as during parsing. Exactly one of these should be set. @@ -79,7 +79,7 @@ public function __construct($data = NULL) { /** * Generated from protobuf field repeated .google.protobuf.UninterpretedOption.NamePart name = 2; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Internal\UninterpretedOption\NamePart> */ public function getName() { @@ -88,7 +88,7 @@ public function getName() /** * Generated from protobuf field repeated .google.protobuf.UninterpretedOption.NamePart name = 2; - * @param array<\Google\Protobuf\Internal\UninterpretedOption\NamePart>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Internal\UninterpretedOption\NamePart[] $var * @return $this */ public function setName($var) diff --git a/php/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php b/php/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php index 784a9cff9e804..547e3f4c31527 100644 --- a/php/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php +++ b/php/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php @@ -7,9 +7,9 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * The name of the uninterpreted option. Each string represents a segment in diff --git a/php/src/Google/Protobuf/ListValue.php b/php/src/Google/Protobuf/ListValue.php index af0845f4b4daf..5d8b8b391c831 100644 --- a/php/src/Google/Protobuf/ListValue.php +++ b/php/src/Google/Protobuf/ListValue.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * `ListValue` is a wrapper around a repeated field of values. @@ -30,7 +30,7 @@ class ListValue extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type array<\Google\Protobuf\Value>|\Google\Protobuf\Internal\RepeatedField $values + * @type \Google\Protobuf\Value[] $values * Repeated field of dynamically typed values. * } */ @@ -43,7 +43,7 @@ public function __construct($data = NULL) { * Repeated field of dynamically typed values. * * Generated from protobuf field repeated .google.protobuf.Value values = 1; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Value> */ public function getValues() { @@ -54,7 +54,7 @@ public function getValues() * Repeated field of dynamically typed values. * * Generated from protobuf field repeated .google.protobuf.Value values = 1; - * @param array<\Google\Protobuf\Value>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Value[] $var * @return $this */ public function setValues($var) diff --git a/php/src/Google/Protobuf/Method.php b/php/src/Google/Protobuf/Method.php index 6c92edf677e98..5e55a764cd168 100644 --- a/php/src/Google/Protobuf/Method.php +++ b/php/src/Google/Protobuf/Method.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Method represents a method of an API interface. @@ -75,7 +75,7 @@ class Method extends \Google\Protobuf\Internal\Message * The URL of the output message type. * @type bool $response_streaming * If true, the response is streamed. - * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options + * @type \Google\Protobuf\Option[] $options * Any metadata attached to the method. * @type int $syntax * The source syntax of this method. @@ -220,7 +220,7 @@ public function setResponseStreaming($var) * Any metadata attached to the method. * * Generated from protobuf field repeated .google.protobuf.Option options = 6; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Option> */ public function getOptions() { @@ -231,7 +231,7 @@ public function getOptions() * Any metadata attached to the method. * * Generated from protobuf field repeated .google.protobuf.Option options = 6; - * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Option[] $var * @return $this */ public function setOptions($var) diff --git a/php/src/Google/Protobuf/Mixin.php b/php/src/Google/Protobuf/Mixin.php index f01a4d24f1897..0250b8e82d25c 100644 --- a/php/src/Google/Protobuf/Mixin.php +++ b/php/src/Google/Protobuf/Mixin.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Declares an API Interface to be included in this interface. The including diff --git a/php/src/Google/Protobuf/Option.php b/php/src/Google/Protobuf/Option.php index aeb8368916b25..7674fda8348ba 100644 --- a/php/src/Google/Protobuf/Option.php +++ b/php/src/Google/Protobuf/Option.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * A protocol buffer option, which can be attached to a message, field, diff --git a/php/src/Google/Protobuf/RepeatedField.php b/php/src/Google/Protobuf/RepeatedField.php index 6bc5feb7f82ab..ffe76e5487c93 100644 --- a/php/src/Google/Protobuf/RepeatedField.php +++ b/php/src/Google/Protobuf/RepeatedField.php @@ -21,6 +21,10 @@ /** * RepeatedField is used by generated protocol message classes to manipulate * repeated fields. It can be used like native PHP array. + * + * @template T + * @implements \ArrayAccess + * @implements \IteratorAggregate */ class RepeatedField implements \ArrayAccess, \IteratorAggregate, \Countable { @@ -35,8 +39,7 @@ class RepeatedField implements \ArrayAccess, \IteratorAggregate, \Countable private $type; /** * @ignore - * @template T of object - * @type string|class-string + * @var string|class-string */ private $klass; /** @@ -47,7 +50,6 @@ class RepeatedField implements \ArrayAccess, \IteratorAggregate, \Countable /** * Constructs an instance of RepeatedField. * - * @template T of object * @param integer $type Type of the stored element. * @param string|class-string $klass Message/Enum class name (message/enum fields only). * @ignore @@ -78,7 +80,6 @@ public function getType() /** * @ignore - * @template T of object * @return string|class-string */ public function getClass() @@ -99,7 +100,6 @@ public function getLegacyClass() * * This will also be called for: $ele = $arr[0] * - * @template T of object * @param integer $offset The index of the element to be fetched. * @return T The stored element at given index. * @throws \ErrorException Invalid type for index. @@ -117,7 +117,6 @@ public function offsetGet($offset) * * This will also be called for: $arr []= $ele and $arr[0] = ele * - * @template T of object * @param int|null $offset The index of the element to be assigned. * @param T $value The element to be assigned. * @return void diff --git a/php/src/Google/Protobuf/SourceContext.php b/php/src/Google/Protobuf/SourceContext.php index cdb5670e48daf..3cebbdecde589 100644 --- a/php/src/Google/Protobuf/SourceContext.php +++ b/php/src/Google/Protobuf/SourceContext.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * `SourceContext` represents information about the source of a diff --git a/php/src/Google/Protobuf/StringValue.php b/php/src/Google/Protobuf/StringValue.php index 9c46c2db99e4b..b745a9e778093 100644 --- a/php/src/Google/Protobuf/StringValue.php +++ b/php/src/Google/Protobuf/StringValue.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Wrapper message for `string`. diff --git a/php/src/Google/Protobuf/Struct.php b/php/src/Google/Protobuf/Struct.php index 38c608908975b..0c433a9144af4 100644 --- a/php/src/Google/Protobuf/Struct.php +++ b/php/src/Google/Protobuf/Struct.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * `Struct` represents a structured data value, consisting of fields diff --git a/php/src/Google/Protobuf/Timestamp.php b/php/src/Google/Protobuf/Timestamp.php index 489e21d36e29e..54d675cb243c8 100644 --- a/php/src/Google/Protobuf/Timestamp.php +++ b/php/src/Google/Protobuf/Timestamp.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * A Timestamp represents a point in time independent of any time zone or local diff --git a/php/src/Google/Protobuf/Type.php b/php/src/Google/Protobuf/Type.php index 6167ba4484b68..c274909abea6d 100644 --- a/php/src/Google/Protobuf/Type.php +++ b/php/src/Google/Protobuf/Type.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * A protocol buffer message type. @@ -67,11 +67,11 @@ class Type extends \Google\Protobuf\Internal\Message * * @type string $name * The fully qualified message name. - * @type array<\Google\Protobuf\Field>|\Google\Protobuf\Internal\RepeatedField $fields + * @type \Google\Protobuf\Field[] $fields * The list of fields. - * @type array|\Google\Protobuf\Internal\RepeatedField $oneofs + * @type string[] $oneofs * The list of types appearing in `oneof` definitions in this type. - * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options + * @type \Google\Protobuf\Option[] $options * The protocol buffer options. * @type \Google\Protobuf\SourceContext $source_context * The source context. @@ -116,7 +116,7 @@ public function setName($var) * The list of fields. * * Generated from protobuf field repeated .google.protobuf.Field fields = 2; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Field> */ public function getFields() { @@ -127,7 +127,7 @@ public function getFields() * The list of fields. * * Generated from protobuf field repeated .google.protobuf.Field fields = 2; - * @param array<\Google\Protobuf\Field>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Field[] $var * @return $this */ public function setFields($var) @@ -142,7 +142,7 @@ public function setFields($var) * The list of types appearing in `oneof` definitions in this type. * * Generated from protobuf field repeated string oneofs = 3; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField */ public function getOneofs() { @@ -153,7 +153,7 @@ public function getOneofs() * The list of types appearing in `oneof` definitions in this type. * * Generated from protobuf field repeated string oneofs = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @param string[] $var * @return $this */ public function setOneofs($var) @@ -168,7 +168,7 @@ public function setOneofs($var) * The protocol buffer options. * * Generated from protobuf field repeated .google.protobuf.Option options = 4; - * @return \Google\Protobuf\Internal\RepeatedField + * @return RepeatedField<\Google\Protobuf\Option> */ public function getOptions() { @@ -179,7 +179,7 @@ public function getOptions() * The protocol buffer options. * * Generated from protobuf field repeated .google.protobuf.Option options = 4; - * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var + * @param \Google\Protobuf\Option[] $var * @return $this */ public function setOptions($var) diff --git a/php/src/Google/Protobuf/UInt32Value.php b/php/src/Google/Protobuf/UInt32Value.php index 84303edff10b0..d7e3b0acf0c30 100644 --- a/php/src/Google/Protobuf/UInt32Value.php +++ b/php/src/Google/Protobuf/UInt32Value.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Wrapper message for `uint32`. diff --git a/php/src/Google/Protobuf/UInt64Value.php b/php/src/Google/Protobuf/UInt64Value.php index e19ba41f28289..a08ea654520c2 100644 --- a/php/src/Google/Protobuf/UInt64Value.php +++ b/php/src/Google/Protobuf/UInt64Value.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * Wrapper message for `uint64`. diff --git a/php/src/Google/Protobuf/Value.php b/php/src/Google/Protobuf/Value.php index 710f39fdf1d9b..85e4c1e526bb9 100644 --- a/php/src/Google/Protobuf/Value.php +++ b/php/src/Google/Protobuf/Value.php @@ -6,8 +6,8 @@ namespace Google\Protobuf; use Google\Protobuf\Internal\GPBType; -use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; +use Google\Protobuf\RepeatedField; /** * `Value` represents a dynamically typed value which can be either diff --git a/php/tests/GeneratedPhpdocTest.php b/php/tests/GeneratedPhpdocTest.php index 8fe74b44ead64..e32d12fe316e7 100644 --- a/php/tests/GeneratedPhpdocTest.php +++ b/php/tests/GeneratedPhpdocTest.php @@ -115,7 +115,7 @@ public function providePhpDocForGettersAndSetters() 'getRepeatedEnum', 'getRepeatedNoNamespaceEnum', ], - '@return int[]' + '@return RepeatedField' ], [ [ @@ -125,45 +125,45 @@ public function providePhpDocForGettersAndSetters() 'getRepeatedFixed64', 'getRepeatedSfixed64', ], - '@return int[]|string[]' + '@return RepeatedField|RepeatedField' ], [ [ 'getRepeatedFloat', 'getRepeatedDouble', ], - '@return float[]' + '@return RepeatedField' ], [ [ 'getRepeatedBool', ], - '@return bool[]' + '@return RepeatedField' ], [ [ 'getRepeatedString', 'getRepeatedBytes', ], - '@return string[]' + '@return RepeatedField' ], [ [ 'getRepeatedMessage', ], - '@return \Foo\TestMessage\Sub[]' + '@return RepeatedField<\Foo\TestMessage\Sub>' ], [ [ 'getRepeatedRecursive', ], - '@return \Foo\TestMessage[]' + '@return RepeatedField<\Foo\TestMessage>' ], [ [ 'getRepeatedNoNamespaceMessage', ], - '@return \NoNamespaceMessage[]' + '@return RepeatedField<\NoNamespaceMessage>' ], [ [ diff --git a/src/google/protobuf/compiler/php/php_generator.cc b/src/google/protobuf/compiler/php/php_generator.cc index c5469eb699ace..ae6e898b34196 100644 --- a/src/google/protobuf/compiler/php/php_generator.cc +++ b/src/google/protobuf/compiler/php/php_generator.cc @@ -435,7 +435,7 @@ std::string PhpGetterTypeName(const FieldDescriptor* field, // accommodate for edge case with multiple types. size_t start_pos = type.find('|'); if (start_pos != std::string::npos) { - type.replace(start_pos, 1, absl::StrCat(type, ">|RepeatedField<", type)); + type.replace(start_pos, 1, ">|RepeatedField<"); } type = absl::StrCat("RepeatedField<", type, ">"); }