From ff42f334a5ec0a560941664715969a7f9846fc54 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Tue, 21 Nov 2017 17:57:31 +0100 Subject: [PATCH] PHP !== Java --- src/Adapter/Adapter.php | 24 ++++++++++++------------ src/Adapter/Guzzle.php | 12 ++++++------ src/Auth/APIKey.php | 2 +- src/Auth/UserServiceKey.php | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/Adapter/Adapter.php b/src/Adapter/Adapter.php index b793f31..b30a561 100644 --- a/src/Adapter/Adapter.php +++ b/src/Adapter/Adapter.php @@ -21,56 +21,56 @@ interface Adapter * Adapter constructor. * * @param Auth $auth - * @param String $baseURI + * @param string $baseURI */ - public function __construct(Auth $auth, String $baseURI); + public function __construct(Auth $auth, string $baseURI); /** * Sends a GET request. * Per Robustness Principle - not including the ability to send a body with a GET request (though possible in the * RFCs, it is never useful). * - * @param String $uri + * @param string $uri * @param array $query * @param array $headers * * @return mixed */ - public function get(String $uri, array $query, array $headers): ResponseInterface; + public function get(string $uri, array $query, array $headers): ResponseInterface; /** - * @param String $uri + * @param string $uri * @param array $headers * @param array $body * * @return mixed */ - public function post(String $uri, array $headers, array $body): ResponseInterface; + public function post(string $uri, array $headers, array $body): ResponseInterface; /** - * @param String $uri + * @param string $uri * @param array $headers * @param array $body * * @return mixed */ - public function put(String $uri, array $headers, array $body): ResponseInterface; + public function put(string $uri, array $headers, array $body): ResponseInterface; /** - * @param String $uri + * @param string $uri * @param array $headers * @param array $body * * @return mixed */ - public function patch(String $uri, array $headers, array $body): ResponseInterface; + public function patch(string $uri, array $headers, array $body): ResponseInterface; /** - * @param String $uri + * @param string $uri * @param array $headers * @param array $body * * @return mixed */ - public function delete(String $uri, array $headers, array $body): ResponseInterface; + public function delete(string $uri, array $headers, array $body): ResponseInterface; } diff --git a/src/Adapter/Guzzle.php b/src/Adapter/Guzzle.php index 78acf3d..b3bb327 100644 --- a/src/Adapter/Guzzle.php +++ b/src/Adapter/Guzzle.php @@ -18,7 +18,7 @@ class Guzzle implements Adapter /** * @inheritDoc */ - public function __construct(Auth $auth, String $baseURI = null) + public function __construct(Auth $auth, string $baseURI = null) { if ($baseURI === null) { $baseURI = 'https://api.cloudflare.com/client/v4/'; @@ -37,7 +37,7 @@ class Guzzle implements Adapter /** * @inheritDoc */ - public function get(String $uri, array $query = [], array $headers = []): ResponseInterface + public function get(string $uri, array $query = [], array $headers = []): ResponseInterface { $response = $this->client->get($uri, ['query' => $query, 'headers' => $headers]); @@ -48,7 +48,7 @@ class Guzzle implements Adapter /** * @inheritDoc */ - public function post(String $uri, array $headers = [], array $body = []): ResponseInterface + public function post(string $uri, array $headers = [], array $body = []): ResponseInterface { $response = $this->client->post( $uri, @@ -65,7 +65,7 @@ class Guzzle implements Adapter /** * @inheritDoc */ - public function put(String $uri, array $headers = [], array $body = []): ResponseInterface + public function put(string $uri, array $headers = [], array $body = []): ResponseInterface { $response = $this->client->put( $uri, @@ -82,7 +82,7 @@ class Guzzle implements Adapter /** * @inheritDoc */ - public function patch(String $uri, array $headers = [], array $body = []): ResponseInterface + public function patch(string $uri, array $headers = [], array $body = []): ResponseInterface { $response = $this->client->patch( $uri, @@ -99,7 +99,7 @@ class Guzzle implements Adapter /** * @inheritDoc */ - public function delete(String $uri, array $headers = [], array $body = []): ResponseInterface + public function delete(string $uri, array $headers = [], array $body = []): ResponseInterface { $response = $this->client->delete( $uri, diff --git a/src/Auth/APIKey.php b/src/Auth/APIKey.php index ddfb1ac..c7eda4b 100644 --- a/src/Auth/APIKey.php +++ b/src/Auth/APIKey.php @@ -12,7 +12,7 @@ class APIKey implements Auth private $email; private $apiKey; - public function __construct(String $email, String $apiKey) + public function __construct(string $email, string $apiKey) { $this->email = $email; $this->apiKey = $apiKey; diff --git a/src/Auth/UserServiceKey.php b/src/Auth/UserServiceKey.php index 7f07d8b..ec9ea51 100644 --- a/src/Auth/UserServiceKey.php +++ b/src/Auth/UserServiceKey.php @@ -11,7 +11,7 @@ class UserServiceKey implements Auth { private $userServiceKey; - public function __construct(String $userServiceKey) + public function __construct(string $userServiceKey) { $this->userServiceKey = $userServiceKey; }