PHP !== Java
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -11,7 +11,7 @@ class UserServiceKey implements Auth
|
||||
{
|
||||
private $userServiceKey;
|
||||
|
||||
public function __construct(String $userServiceKey)
|
||||
public function __construct(string $userServiceKey)
|
||||
{
|
||||
$this->userServiceKey = $userServiceKey;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user