← All changes
|
includes/sdk/google/google/auth/src/Credentials/IAMCredentials.php
+5
-5
1.1.0
→
1.4.2
View file →
| @@ -14,9 +14,9 @@ | ||
| 14 | 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | 15 | * See the License for the specific language governing permissions and |
| 16 | 16 | * limitations under the License. |
| 17 | 17 | */ |
| 18 | -namespace Dudlewebs\WPMCS\Google\Auth\Credentials; | |
| 18 | +namespace Dudlewebs\WPMCS\GCP\Google\Auth\Credentials; | |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * Authenticates requests using IAM credentials. |
| 22 | 22 | */ |
| @@ -37,12 +37,12 @@ | ||
| 37 | 37 | * @param string $token the IAM token |
| 38 | 38 | */ |
| 39 | 39 | public function __construct($selector, $token) |
| 40 | 40 | { |
| 41 | - if (!is_string($selector)) { | |
| 41 | + if (!\is_string($selector)) { | |
| 42 | 42 | throw new \InvalidArgumentException('selector must be a string'); |
| 43 | 43 | } |
| 44 | - if (!is_string($token)) { | |
| 44 | + if (!\is_string($token)) { | |
| 45 | 45 | throw new \InvalidArgumentException('token must be a string'); |
| 46 | 46 | } |
| 47 | 47 | $this->selector = $selector; |
| 48 | 48 | $this->token = $token; |
| @@ -60,15 +60,15 @@ | ||
| 60 | 60 | * Updates metadata with the appropriate header metadata. |
| 61 | 61 | * |
| 62 | 62 | * @param array<mixed> $metadata metadata hashmap |
| 63 | 63 | * @param string $unusedAuthUri optional auth uri |
| 64 | - * @param callable $httpHandler callback which delivers psr7 request | |
| 64 | + * @param callable|null $httpHandler callback which delivers psr7 request | |
| 65 | 65 | * Note: this param is unused here, only included here for |
| 66 | 66 | * consistency with other credentials class |
| 67 | 67 | * |
| 68 | 68 | * @return array<mixed> updated metadata hashmap |
| 69 | 69 | */ |
| 70 | - public function updateMetadata($metadata, $unusedAuthUri = null, callable $httpHandler = null) | |
| 70 | + public function updateMetadata($metadata, $unusedAuthUri = null, ?callable $httpHandler = null) | |
| 71 | 71 | { |
| 72 | 72 | $metadata_copy = $metadata; |
| 73 | 73 | $metadata_copy[self::SELECTOR_KEY] = $this->selector; |
| 74 | 74 | $metadata_copy[self::TOKEN_KEY] = $this->token; |