diff options
author | Bo Yang <paulyang1211@gmail.com> | 2017-08-05 10:42:29 -0700 |
---|---|---|
committer | Bo Yang <paulyang1211@gmail.com> | 2017-08-05 10:42:29 -0700 |
commit | 8f4b8e430a0cf087af423be434cf8d837027c651 (patch) | |
tree | a7a79a2ff33b31b9036eb378eb458928a0648481 /php/src/Google/Protobuf/Internal/DescriptorPool.php | |
parent | c2f69d6fa23a815948368fae0b8c1e56e50715c9 (diff) | |
parent | f14703c933d04a4aac285c482bf828269bd0a151 (diff) |
Merge branch 'master' into 3.4.x
Diffstat (limited to 'php/src/Google/Protobuf/Internal/DescriptorPool.php')
-rw-r--r-- | php/src/Google/Protobuf/Internal/DescriptorPool.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/php/src/Google/Protobuf/Internal/DescriptorPool.php b/php/src/Google/Protobuf/Internal/DescriptorPool.php index 2c00dfb6..65d1a884 100644 --- a/php/src/Google/Protobuf/Internal/DescriptorPool.php +++ b/php/src/Google/Protobuf/Internal/DescriptorPool.php @@ -61,17 +61,17 @@ class DescriptorPool $files->mergeFromString($data); $file = FileDescriptor::buildFromProto($files->getFile()[0]); - foreach ($file->getMessageType() as &$desc) { + foreach ($file->getMessageType() as $desc) { $this->addDescriptor($desc); } unset($desc); - foreach ($file->getEnumType() as &$desc) { + foreach ($file->getEnumType() as $desc) { $this->addEnumDescriptor($desc); } unset($desc); - foreach ($file->getMessageType() as &$desc) { + foreach ($file->getMessageType() as $desc) { $this->crossLink($desc); } unset($desc); @@ -129,9 +129,9 @@ class DescriptorPool return $this->class_to_enum_desc[$klass]; } - private function crossLink(&$desc) + private function crossLink(Descriptor $desc) { - foreach ($desc->getField() as &$field) { + foreach ($desc->getField() as $field) { switch ($field->getType()) { case GPBType::MESSAGE: $proto = $field->getMessageType(); @@ -149,7 +149,7 @@ class DescriptorPool } unset($field); - foreach ($desc->getNestedType() as &$nested_type) { + foreach ($desc->getNestedType() as $nested_type) { $this->crossLink($nested_type); } unset($nested_type); @@ -157,7 +157,7 @@ class DescriptorPool public function finish() { - foreach ($this->class_to_desc as $klass => &$desc) { + foreach ($this->class_to_desc as $klass => $desc) { $this->crossLink($desc); } unset($desc); |