From 7cf7d59a540ad7ac4f5f0f192e9712d350af1aeb Mon Sep 17 00:00:00 2001 From: Benjamin Blake Date: Fri, 28 Feb 2020 18:53:39 -0700 Subject: [PATCH] Small updates to Interfaces and abstract classes + Removed extra spaces from method definitions --- src/Api/Abstracts/AbstractApiRequester.php | 2 +- src/Api/Interfaces/ApiRequesterInterface.php | 2 +- src/Model/Abstracts/AbstractApiModel.php | 4 ++-- src/Model/Interfaces/ApiModelInterface.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Api/Abstracts/AbstractApiRequester.php b/src/Api/Abstracts/AbstractApiRequester.php index 80dae96..6bae78b 100644 --- a/src/Api/Abstracts/AbstractApiRequester.php +++ b/src/Api/Abstracts/AbstractApiRequester.php @@ -99,7 +99,7 @@ abstract class AbstractApiRequester implements ApiRequesterInterface, RequestCha * @param Client $client * @param object|null $caller */ - public function __construct(Client &$client , ?object $caller) + public function __construct(Client &$client, ?object $caller) { $this->setClient($client); $this->setCaller($caller); diff --git a/src/Api/Interfaces/ApiRequesterInterface.php b/src/Api/Interfaces/ApiRequesterInterface.php index e2f658d..e34be63 100644 --- a/src/Api/Interfaces/ApiRequesterInterface.php +++ b/src/Api/Interfaces/ApiRequesterInterface.php @@ -15,7 +15,7 @@ interface ApiRequesterInterface * @param Client $client * @param object|null $caller */ - public function __construct(Client &$client , ?object $caller); + public function __construct(Client &$client, ?object $caller); /** * Get the gitea client (by reference) diff --git a/src/Model/Abstracts/AbstractApiModel.php b/src/Model/Abstracts/AbstractApiModel.php index b55da12..5de1702 100644 --- a/src/Model/Abstracts/AbstractApiModel.php +++ b/src/Model/Abstracts/AbstractApiModel.php @@ -28,7 +28,7 @@ abstract class AbstractApiModel implements ApiModelInterface, JsonSerializable, * @param object|null $caller The object that called this method * @param mixed $args The organization visibility. */ - public function __construct(Client &$client , ?object $caller, ...$args) { + public function __construct(Client &$client, ?object $caller, ...$args) { $this->setClient($client); $this->setCaller($caller); } @@ -59,7 +59,7 @@ abstract class AbstractApiModel implements ApiModelInterface, JsonSerializable, * @param object|null $caller The object that called this method * @param object $map A JSON data object */ - static function fromJson(object &$client , ?object $caller, object $map) { + static function fromJson(object &$client, ?object $caller, object $map) { trigger_error("The abstract 'fromJson()' method must be overwritten"); return false; } diff --git a/src/Model/Interfaces/ApiModelInterface.php b/src/Model/Interfaces/ApiModelInterface.php index 1fbab7f..ceded2e 100644 --- a/src/Model/Interfaces/ApiModelInterface.php +++ b/src/Model/Interfaces/ApiModelInterface.php @@ -19,7 +19,7 @@ interface ApiModelInterface * @param object|null $caller The object that called this method * @param mixed $args The organization visibility. */ - public function __construct(Client &$client , ?object $caller, ...$args); + public function __construct(Client &$client, ?object $caller, ...$args); /** * Create a new API model object from a JSON map object @@ -39,7 +39,7 @@ interface ApiModelInterface * @param object|null $caller The object that called this method * @param object $map A JSON data object */ - static function fromJson(object &$client , ?object $caller, object $map); + static function fromJson(object &$client, ?object $caller, object $map); /** * Convert this Api model object to a JSON map.