From f683f036719057563b65f6e0a3478e3f627c3ec7 Mon Sep 17 00:00:00 2001 From: prochazkam Date: Tue, 8 Jun 2021 15:28:34 +0200 Subject: [PATCH 1/2] fix - required parameter follows optional parameter (php8 compatibility) --- src/Jaspersoft/Tool/RESTRequest.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Jaspersoft/Tool/RESTRequest.php b/src/Jaspersoft/Tool/RESTRequest.php index 2ad536a..3a86809 100644 --- a/src/Jaspersoft/Tool/RESTRequest.php +++ b/src/Jaspersoft/Tool/RESTRequest.php @@ -519,7 +519,18 @@ public function multipartRequestSend($url, $expectedCode = 200, $verb = 'PUT_MP' } - public function sendBinary($url, $expectedCodes = array(200), $body, $contentType, $contentDisposition, $contentDescription, $verb = "POST") + /** + * @param $url + * @param $expectedCodes + * @param $body + * @param $contentType + * @param $contentDisposition + * @param $contentDescription + * @param string $verb + * @return null + * @throws RESTRequestException + */ + public function sendBinary($url, $expectedCodes, $body, $contentType, $contentDisposition, $contentDescription, $verb = "POST") { $this->flush(); $this->setUrl($url); From d089d2d84a1236c7d9e785fd70d77cb1af2a154e Mon Sep 17 00:00:00 2001 From: prochazkam Date: Mon, 19 Jul 2021 12:27:47 +0200 Subject: [PATCH 2/2] Adding types into constructor parameters --- src/Jaspersoft/Client/Client.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Jaspersoft/Client/Client.php b/src/Jaspersoft/Client/Client.php index 94759eb..b664019 100644 --- a/src/Jaspersoft/Client/Client.php +++ b/src/Jaspersoft/Client/Client.php @@ -17,10 +17,10 @@ class Client { private $restReq; private $restUrl2; - protected $hostname; - protected $username; - protected $password; - protected $orgId; + protected $hostname; + protected $username; + protected $password; + protected $orgId; protected $repositoryService; protected $userService; protected $organizationService; @@ -36,7 +36,7 @@ class Client protected $logCollectorService; protected $serverService; - public function __construct($serverUrl, $username, $password, $orgId = null) + public function __construct(string $serverUrl, string $username, string $password, $orgId = null) { $this->serverUrl = $serverUrl; $this->username = $username;