From a12c1d559dcfae583d2729e9f6e594f612488059 Mon Sep 17 00:00:00 2001 From: Attila Kerekes Date: Sat, 26 Nov 2022 14:12:13 +0100 Subject: [PATCH] fix: Use correct appTest argument type --- app/SupportedApps.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/SupportedApps.php b/app/SupportedApps.php index cf200c06c..175104f2a 100644 --- a/app/SupportedApps.php +++ b/app/SupportedApps.php @@ -18,10 +18,10 @@ abstract class SupportedApps /** * @param $url * @param array $attrs - * @param bool $overridevars * @return object + * @throws GuzzleException */ - public function appTest($url, array $attrs = [], bool $overridevars = false): object + public function appTest($url, array $attrs = []): object { if (empty($this->config->url)) { return (object) [ @@ -63,20 +63,20 @@ public function appTest($url, array $attrs = [], bool $overridevars = false): ob /** * @param $url * @param array $attrs - * @param bool $overridevars - * @param bool $overridemethod + * @param array|null $overridevars + * @param string|null $overridemethod * @return ResponseInterface|null * @throws GuzzleException */ public function execute( $url, array $attrs = [], - bool $overridevars = false, - bool $overridemethod = false + array $overridevars = null, + string $overridemethod = null ): ?ResponseInterface { $res = null; - $vars = ($overridevars !== false) ? + $vars = ($overridevars !== null) ? $overridevars : [ 'http_errors' => false, 'timeout' => 15, @@ -85,7 +85,7 @@ public function execute( $client = new Client($vars); - $method = ($overridemethod !== false) ? $overridemethod : $this->method; + $method = ($overridemethod !== null) ? $overridemethod : $this->method; try { return $client->request($method, $url, $attrs);