← All changes
|
includes/sdk/google/google/protobuf/src/Google/Protobuf/NullValue.php
+8
-7
1.1.0
→
1.4.2
View file →
| @@ -1,15 +1,16 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 4 | +# NO CHECKED-IN PROTOBUF GENCODE | |
| 4 | 5 | # source: google/protobuf/struct.proto |
| 5 | -namespace Dudlewebs\WPMCS\Google\Protobuf; | |
| 6 | +namespace Dudlewebs\WPMCS\GCP\Google\Protobuf; | |
| 6 | 7 | |
| 7 | 8 | use UnexpectedValueException; |
| 8 | 9 | /** |
| 9 | 10 | * `NullValue` is a singleton enumeration to represent the null value for the |
| 10 | 11 | * `Value` type union. |
| 11 | - * The JSON representation for `NullValue` is JSON `null`. | |
| 12 | + * The JSON representation for `NullValue` is JSON `null`. | |
| 12 | 13 | * |
| 13 | 14 | * Protobuf type <code>google.protobuf.NullValue</code> |
| 14 | 15 | */ |
| 15 | 16 | class NullValue |
| @@ -23,17 +24,17 @@ | ||
| 23 | 24 | private static $valueToName = [self::NULL_VALUE => 'NULL_VALUE']; |
| 24 | 25 | public static function name($value) |
| 25 | 26 | { |
| 26 | 27 | if (!isset(self::$valueToName[$value])) { |
| 27 | - throw new UnexpectedValueException(sprintf('Enum %s has no name defined for value %s', __CLASS__, $value)); | |
| 28 | + throw new UnexpectedValueException(\sprintf('Enum %s has no name defined for value %s', __CLASS__, $value)); | |
| 28 | 29 | } |
| 29 | 30 | return self::$valueToName[$value]; |
| 30 | 31 | } |
| 31 | 32 | public static function value($name) |
| 32 | 33 | { |
| 33 | - $const = __CLASS__ . '::' . strtoupper($name); | |
| 34 | - if (!defined($const)) { | |
| 35 | - throw new UnexpectedValueException(sprintf('Enum %s has no value defined for name %s', __CLASS__, $name)); | |
| 34 | + $const = __CLASS__ . '::' . \strtoupper($name); | |
| 35 | + if (!\defined($const)) { | |
| 36 | + throw new UnexpectedValueException(\sprintf('Enum %s has no value defined for name %s', __CLASS__, $name)); | |
| 36 | 37 | } |
| 37 | - return constant($const); | |
| 38 | + return \constant($const); | |
| 38 | 39 | } |
| 39 | 40 | } |