فهرست منبع

Fix Issue #5345 (#5381)

Added a few \ on the comments to match the exceptions scope when is referenced while in a namespace. So the IDEs can be happy.
Nicolás Elliott 6 سال پیش
والد
کامیت
54683e607b

+ 3 - 3
php/src/Google/Protobuf/Any.php

@@ -252,9 +252,9 @@ class Any extends \Google\Protobuf\Internal\Message
      * the method will create a message of the targeted type and fill it with
      * the decoded value in Any.
      * @return unpacked message
-     * @throws Exception Type url needs to be type.googleapis.com/fully-qulified.
-     * @throws Exception Class hasn't been added to descriptor pool.
-     * @throws Exception cannot decode data in value field.
+     * @throws \Exception Type url needs to be type.googleapis.com/fully-qulified.
+     * @throws \Exception Class hasn't been added to descriptor pool.
+     * @throws \Exception cannot decode data in value field.
      */
     public function unpack()
     {

+ 1 - 1
php/src/Google/Protobuf/Internal/CodedInputStream.php

@@ -317,7 +317,7 @@ class CodedInputStream
      * passed unchanged to the corresponding call to popLimit().
      *
      * @param integer $byte_limit
-     * @throws Exception Fail to push limit.
+     * @throws \Exception Fail to push limit.
      */
     public function pushLimit($byte_limit)
     {

+ 7 - 7
php/src/Google/Protobuf/Internal/MapField.php

@@ -131,8 +131,8 @@ class MapField implements \ArrayAccess, \IteratorAggregate, \Countable
      *
      * @param object $key The key of the element to be fetched.
      * @return object The stored element at given key.
-     * @throws ErrorException Invalid type for index.
-     * @throws ErrorException Non-existing index.
+     * @throws \ErrorException Invalid type for index.
+     * @throws \ErrorException Non-existing index.
      */
     public function offsetGet($key)
     {
@@ -147,9 +147,9 @@ class MapField implements \ArrayAccess, \IteratorAggregate, \Countable
      * @param object $key The key of the element to be fetched.
      * @param object $value The element to be assigned.
      * @return void
-     * @throws ErrorException Invalid type for key.
-     * @throws ErrorException Invalid type for value.
-     * @throws ErrorException Non-existing key.
+     * @throws \ErrorException Invalid type for key.
+     * @throws \ErrorException Invalid type for value.
+     * @throws \ErrorException Non-existing key.
      */
     public function offsetSet($key, $value)
     {
@@ -207,7 +207,7 @@ class MapField implements \ArrayAccess, \IteratorAggregate, \Countable
      *
      * @param object $key The key of the element to be removed.
      * @return void
-     * @throws ErrorException Invalid type for key.
+     * @throws \ErrorException Invalid type for key.
      */
     public function offsetUnset($key)
     {
@@ -222,7 +222,7 @@ class MapField implements \ArrayAccess, \IteratorAggregate, \Countable
      *
      * @param object $key The key of the element to be removed.
      * @return bool True if the element at the given key exists.
-     * @throws ErrorException Invalid type for key.
+     * @throws \ErrorException Invalid type for key.
      */
     public function offsetExists($key)
     {

+ 2 - 2
php/src/Google/Protobuf/Internal/Message.php

@@ -716,7 +716,7 @@ class Message
      *
      * @param string $data Binary protobuf data.
      * @return null.
-     * @throws Exception Invalid data.
+     * @throws \Exception Invalid data.
      */
     public function mergeFromString($data)
     {
@@ -734,7 +734,7 @@ class Message
      *
      * @param string $data Json protobuf data.
      * @return null.
-     * @throws Exception Invalid data.
+     * @throws \Exception Invalid data.
      */
     public function mergeFromJsonString($data)
     {

+ 8 - 8
php/src/Google/Protobuf/Internal/RepeatedField.php

@@ -118,8 +118,8 @@ class RepeatedField implements \ArrayAccess, \IteratorAggregate, \Countable
      *
      * @param long $offset The index of the element to be fetched.
      * @return object The stored element at given index.
-     * @throws ErrorException Invalid type for index.
-     * @throws ErrorException Non-existing index.
+     * @throws \ErrorException Invalid type for index.
+     * @throws \ErrorException Non-existing index.
      */
     public function offsetGet($offset)
     {
@@ -134,9 +134,9 @@ class RepeatedField implements \ArrayAccess, \IteratorAggregate, \Countable
      * @param long $offset The index of the element to be assigned.
      * @param object $value The element to be assigned.
      * @return void
-     * @throws ErrorException Invalid type for index.
-     * @throws ErrorException Non-existing index.
-     * @throws ErrorException Incorrect type of the element.
+     * @throws \ErrorException Invalid type for index.
+     * @throws \ErrorException Non-existing index.
+     * @throws \ErrorException Incorrect type of the element.
      */
     public function offsetSet($offset, $value)
     {
@@ -206,8 +206,8 @@ class RepeatedField implements \ArrayAccess, \IteratorAggregate, \Countable
      *
      * @param long $offset The index of the element to be removed.
      * @return void
-     * @throws ErrorException Invalid type for index.
-     * @throws ErrorException The element to be removed is not at the end of the
+     * @throws \ErrorException Invalid type for index.
+     * @throws \ErrorException The element to be removed is not at the end of the
      * RepeatedField.
      */
     public function offsetUnset($offset)
@@ -229,7 +229,7 @@ class RepeatedField implements \ArrayAccess, \IteratorAggregate, \Countable
      *
      * @param long $offset The index of the element to be removed.
      * @return bool True if the element at the given offset exists.
-     * @throws ErrorException Invalid type for index.
+     * @throws \ErrorException Invalid type for index.
      */
     public function offsetExists($offset)
     {