From 852af5cda6b1200ee0186822181d62144554455f Mon Sep 17 00:00:00 2001 From: Maccabee Levine Date: Fri, 5 Jan 2024 12:39:55 +0000 Subject: [PATCH] Add typehints --- module/VuFind/src/VuFind/Connection/ExternalVuFind.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/module/VuFind/src/VuFind/Connection/ExternalVuFind.php b/module/VuFind/src/VuFind/Connection/ExternalVuFind.php index bf8ba109bbb..11a4abc1e2e 100644 --- a/module/VuFind/src/VuFind/Connection/ExternalVuFind.php +++ b/module/VuFind/src/VuFind/Connection/ExternalVuFind.php @@ -62,7 +62,7 @@ class ExternalVuFind implements * * @return void */ - public function setBaseUrl($baseUrl) + public function setBaseUrl(string $baseUrl): void { $this->baseUrl = $baseUrl; } @@ -77,8 +77,12 @@ public function setBaseUrl($baseUrl) * * @return array The JSON-decoded response from the API. */ - public function search($queryString, $requestParam, $limit, $searchFilters = []) - { + public function search( + string $queryString, + string $requestParam, + int $limit, + array $searchFilters = [] + ): array { if (!$this->baseUrl) { $this->logError('Must call setBaseUrl() before searching.'); return [];