← All changes
|
includes/sdk/google/google/common-protos/src/Cloud/OperationResponseMapping.php
+6
-6
1.1.0
→
1.4.2
View file →
| @@ -1,9 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 4 | 4 | # source: google/cloud/extended_operations.proto |
| 5 | -namespace Dudlewebs\WPMCS\Google\Cloud; | |
| 5 | +namespace Dudlewebs\WPMCS\GCP\Google\Cloud; | |
| 6 | 6 | |
| 7 | 7 | use UnexpectedValueException; |
| 8 | 8 | /** |
| 9 | 9 | * An enum to be used to mark the essential (for polling) fields in an |
| @@ -56,17 +56,17 @@ | ||
| 56 | 56 | private static $valueToName = [self::UNDEFINED => 'UNDEFINED', self::NAME => 'NAME', self::STATUS => 'STATUS', self::ERROR_CODE => 'ERROR_CODE', self::ERROR_MESSAGE => 'ERROR_MESSAGE']; |
| 57 | 57 | public static function name($value) |
| 58 | 58 | { |
| 59 | 59 | if (!isset(self::$valueToName[$value])) { |
| 60 | - throw new UnexpectedValueException(sprintf('Enum %s has no name defined for value %s', __CLASS__, $value)); | |
| 60 | + throw new UnexpectedValueException(\sprintf('Enum %s has no name defined for value %s', __CLASS__, $value)); | |
| 61 | 61 | } |
| 62 | 62 | return self::$valueToName[$value]; |
| 63 | 63 | } |
| 64 | 64 | public static function value($name) |
| 65 | 65 | { |
| 66 | - $const = __CLASS__ . '::' . strtoupper($name); | |
| 67 | - if (!defined($const)) { | |
| 68 | - throw new UnexpectedValueException(sprintf('Enum %s has no value defined for name %s', __CLASS__, $name)); | |
| 66 | + $const = __CLASS__ . '::' . \strtoupper($name); | |
| 67 | + if (!\defined($const)) { | |
| 68 | + throw new UnexpectedValueException(\sprintf('Enum %s has no value defined for name %s', __CLASS__, $name)); | |
| 69 | 69 | } |
| 70 | - return constant($const); | |
| 70 | + return \constant($const); | |
| 71 | 71 | } |
| 72 | 72 | } |