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); + } }