diff --git a/.php_cs b/.php_cs index 3151aa3..1280456 100644 --- a/.php_cs +++ b/.php_cs @@ -9,6 +9,7 @@ return PhpCsFixer\Config::create() ->setUsingCache(false) ->setRules([ '@PSR2' => true, + 'array_syntax' => ['syntax' => 'short'], ]) ->setFinder($finder) ; diff --git a/src/Adapter/Guzzle.php b/src/Adapter/Guzzle.php index aa858ba..205ff84 100644 --- a/src/Adapter/Guzzle.php +++ b/src/Adapter/Guzzle.php @@ -37,7 +37,7 @@ class Guzzle implements Adapter /** * @inheritDoc */ - public function get(String $uri, array $query = array(), array $headers = array()): 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(), array $body = array()): 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(), array $body = array()): ResponseInterface + public function put(String $uri, array $headers = [], array $body = []): ResponseInterface { $jsonBody = json_encode($body); @@ -84,7 +84,7 @@ class Guzzle implements Adapter /** * @inheritDoc */ - public function patch(String $uri, array $headers = array(), array $body = array()): ResponseInterface + public function patch(String $uri, array $headers = [], array $body = []): ResponseInterface { $jsonBody = json_encode($body); @@ -103,7 +103,7 @@ class Guzzle implements Adapter /** * @inheritDoc */ - public function delete(String $uri, array $headers = array(), array $body = array()): ResponseInterface + public function delete(String $uri, array $headers = [], array $body = []): ResponseInterface { $response = $this->client->delete( $uri, diff --git a/src/Configurations/PageRulesActions.php b/src/Configurations/PageRulesActions.php index 931fc17..524a3f0 100644 --- a/src/Configurations/PageRulesActions.php +++ b/src/Configurations/PageRulesActions.php @@ -10,7 +10,7 @@ namespace Cloudflare\API\Configurations; class PageRulesActions implements Configurations { - private $configs = array(); + private $configs = []; public function setAlwaysOnline(bool $active) { diff --git a/src/Configurations/UARules.php b/src/Configurations/UARules.php index 3bed629..3b9fe62 100644 --- a/src/Configurations/UARules.php +++ b/src/Configurations/UARules.php @@ -10,7 +10,7 @@ namespace Cloudflare\API\Configurations; class UARules implements Configurations { - private $configs = array(); + private $configs = []; public function addUA(string $value) { diff --git a/src/Configurations/ZoneLockdown.php b/src/Configurations/ZoneLockdown.php index 644bde4..4544215 100644 --- a/src/Configurations/ZoneLockdown.php +++ b/src/Configurations/ZoneLockdown.php @@ -10,7 +10,7 @@ namespace Cloudflare\API\Configurations; class ZoneLockdown implements Configurations { - private $configs = array(); + private $configs = []; public function addIP(string $value) {