From 362e4654cd82d1d001b806afc08db925bfeca237 Mon Sep 17 00:00:00 2001 From: aB0t Date: Wed, 26 Jul 2023 12:22:59 +0200 Subject: [PATCH] update 2023-07-26 12:22:59 --- .../code.php | 3 +-- .../code.power | 2 +- .../README.md | 2 +- .../code.php | 17 ++++++++++++----- .../code.power | 17 ++++++++++++----- 5 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/0bb2b72f-ebcd-46fe-844b-ac5fe715c230/code.php b/src/0bb2b72f-ebcd-46fe-844b-ac5fe715c230/code.php index edfab0d..dea2c31 100644 --- a/src/0bb2b72f-ebcd-46fe-844b-ac5fe715c230/code.php +++ b/src/0bb2b72f-ebcd-46fe-844b-ac5fe715c230/code.php @@ -830,7 +830,6 @@ class Repository implements ServiceProviderInterface $container->get('Gitea.Dynamic.Uri'), $container->get('Gitea.Utilities.Response') ); - } - + } } diff --git a/src/0bb2b72f-ebcd-46fe-844b-ac5fe715c230/code.power b/src/0bb2b72f-ebcd-46fe-844b-ac5fe715c230/code.power index af774ba..4fb2acc 100644 --- a/src/0bb2b72f-ebcd-46fe-844b-ac5fe715c230/code.power +++ b/src/0bb2b72f-ebcd-46fe-844b-ac5fe715c230/code.power @@ -767,4 +767,4 @@ $container->get('Gitea.Dynamic.Uri'), $container->get('Gitea.Utilities.Response') ); - } + } \ No newline at end of file diff --git a/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/README.md b/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/README.md index d4d0582..0f412ad 100644 --- a/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/README.md +++ b/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/README.md @@ -15,7 +15,7 @@ abstract Api #Orange { # Uri $uri # Response $response + __construct(Http $http, Uri $uri, ...) - + load_(string $url, string $token) : void + + load_(?string $url = null, ?string $token = null) : void } note right of Api::__construct diff --git a/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/code.php b/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/code.php index 7f76657..912af82 100644 --- a/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/code.php +++ b/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/code.php @@ -67,16 +67,23 @@ abstract class Api /** * Load/Reload API. * - * @param string $url The url. - * @param token $token The token. + * @param string|null $url The url. + * @param token|null $token The token. * * @return void * @since 3.2.0 **/ - public function load_(string $url, string $token) + public function load_(?string $url = null, ?string $token = null) { - $this->uri->setUrl($url); - $this->http->setToken($token); + if ($url !== null) + { + $this->uri->setUrl($url); + } + + if ($token !== null) + { + $this->http->setToken($token); + } } } diff --git a/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/code.power b/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/code.power index 9e49af4..ce6ddc1 100644 --- a/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/code.power +++ b/src/3d7af7a2-dabe-4111-b5fd-c5bfa8755469/code.power @@ -41,14 +41,21 @@ /** * Load/Reload API. * - * @param string $url The url. - * @param token $token The token. + * @param string|null $url The url. + * @param token|null $token The token. * * @return void * @since 3.2.0 **/ - public function load_(string $url, string $token) + public function load_(?string $url = null, ?string $token = null) { - $this->uri->setUrl($url); - $this->http->setToken($token); + if ($url !== null) + { + $this->uri->setUrl($url); + } + + if ($token !== null) + { + $this->http->setToken($token); + } }