From 32c665d1e2d96d29be2a136745e8326bc89ff507 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 28 Dec 2022 09:25:09 -0800 Subject: [PATCH] chore: fix php lint --- php/src/Google/Protobuf/Internal/AnyBase.php | 4 ++-- .../Google/Protobuf/Internal/CodedInputStream.php | 11 +++++------ php/src/Google/Protobuf/Internal/MapFieldIter.php | 5 ++--- php/src/Google/Protobuf/Internal/Message.php | 13 +++++++------ .../Google/Protobuf/Internal/RepeatedFieldIter.php | 3 +-- 5 files changed, 17 insertions(+), 19 deletions(-) diff --git a/php/src/Google/Protobuf/Internal/AnyBase.php b/php/src/Google/Protobuf/Internal/AnyBase.php index cba922d475..5e9ab5705e 100644 --- a/php/src/Google/Protobuf/Internal/AnyBase.php +++ b/php/src/Google/Protobuf/Internal/AnyBase.php @@ -50,7 +50,7 @@ class AnyBase extends \Google\Protobuf\Internal\Message /** * The type_url will be created according to the given message’s type and * the value is encoded data from the given message.. - * @param message: A proto message. + * @param Message $msg A proto message. */ public function pack($msg) { @@ -73,7 +73,7 @@ class AnyBase extends \Google\Protobuf\Internal\Message /** * This method returns whether the type_url in any_message is corresponded * to the given class. - * @param klass: The fully qualified PHP class name of a proto message type. + * @param string $klass The fully qualified PHP class name of a proto message type. */ public function is($klass) { diff --git a/php/src/Google/Protobuf/Internal/CodedInputStream.php b/php/src/Google/Protobuf/Internal/CodedInputStream.php index 2ed2dfde20..a33fec2f67 100644 --- a/php/src/Google/Protobuf/Internal/CodedInputStream.php +++ b/php/src/Google/Protobuf/Internal/CodedInputStream.php @@ -113,7 +113,7 @@ class CodedInputStream /** * Read uint32 into $var. Advance buffer with consumed bytes. If the * contained varint is larger than 32 bits, discard the high order bits. - * @param $var. + * @param $var */ public function readVarint32(&$var) { @@ -142,7 +142,7 @@ class CodedInputStream /** * Read Uint64 into $var. Advance buffer with consumed bytes. - * @param $var. + * @param $var */ public function readVarint64(&$var) { @@ -208,7 +208,7 @@ class CodedInputStream /** * Read int into $var. If the result is larger than the largest integer, $var * will be -1. Advance buffer with consumed bytes. - * @param $var. + * @param $var */ public function readVarintSizeAsInt(&$var) { @@ -222,7 +222,7 @@ class CodedInputStream /** * Read 32-bit unsigned integer to $var. If the buffer has less than 4 bytes, * return false. Advance buffer with consumed bytes. - * @param $var. + * @param $var */ public function readLittleEndian32(&$var) { @@ -238,7 +238,7 @@ class CodedInputStream /** * Read 64-bit unsigned integer to $var. If the buffer has less than 8 bytes, * return false. Advance buffer with consumed bytes. - * @param $var. + * @param $var */ public function readLittleEndian64(&$var) { @@ -261,7 +261,6 @@ class CodedInputStream /** * Read tag into $var. Advance buffer with consumed bytes. - * @param $var. */ public function readTag() { diff --git a/php/src/Google/Protobuf/Internal/MapFieldIter.php b/php/src/Google/Protobuf/Internal/MapFieldIter.php index 2ff6b44ae3..63f1875297 100644 --- a/php/src/Google/Protobuf/Internal/MapFieldIter.php +++ b/php/src/Google/Protobuf/Internal/MapFieldIter.php @@ -52,9 +52,8 @@ class MapFieldIter implements \Iterator /** * Create iterator instance for MapField. * - * @param MapField The MapField instance for which this iterator is - * created. - * @param GPBType Map key type. + * @param array $container + * @param GPBType $key_type Map key type. * @ignore */ public function __construct($container, $key_type) diff --git a/php/src/Google/Protobuf/Internal/Message.php b/php/src/Google/Protobuf/Internal/Message.php index f412b419c8..357f16d699 100644 --- a/php/src/Google/Protobuf/Internal/Message.php +++ b/php/src/Google/Protobuf/Internal/Message.php @@ -544,7 +544,7 @@ class Message /** * Clear all containing fields. - * @return null. + * @return null */ public function clear() { @@ -654,7 +654,7 @@ class Message /** * Clear all unknown fields previously parsed. - * @return null. + * @return null */ public function discardUnknownFields() { @@ -700,7 +700,7 @@ class Message * sub-messages are deep-copied. * * @param object $msg Protobuf message to be merged from. - * @return null. + * @return null */ public function mergeFrom($msg) { @@ -767,7 +767,7 @@ class Message * specified message. * * @param string $data Binary protobuf data. - * @return null. + * @return null * @throws \Exception Invalid data. */ public function mergeFromString($data) @@ -785,7 +785,8 @@ class Message * specified message. * * @param string $data Json protobuf data. - * @return null. + * @param bool $ignore_unknown + * @return null * @throws \Exception Invalid data. */ public function mergeFromJsonString($data, $ignore_unknown = false) @@ -1053,7 +1054,7 @@ class Message * must receive data that is either a string or a StringValue object. * * @param array $array An array containing message properties and values. - * @return null. + * @return null */ protected function mergeFromArray(array $array) { diff --git a/php/src/Google/Protobuf/Internal/RepeatedFieldIter.php b/php/src/Google/Protobuf/Internal/RepeatedFieldIter.php index ec99b64ae7..2b541862a9 100644 --- a/php/src/Google/Protobuf/Internal/RepeatedFieldIter.php +++ b/php/src/Google/Protobuf/Internal/RepeatedFieldIter.php @@ -56,8 +56,7 @@ class RepeatedFieldIter implements \Iterator /** * Create iterator instance for RepeatedField. * - * @param RepeatedField The RepeatedField instance for which this iterator - * is created. + * @param array $container * @ignore */ public function __construct($container)