Skip to content

Commit

Permalink
Add typehints
Browse files Browse the repository at this point in the history
  • Loading branch information
maccabeelevine committed Jan 5, 2024
1 parent e94fad1 commit 852af5c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions module/VuFind/src/VuFind/Connection/ExternalVuFind.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class ExternalVuFind implements
*
* @return void
*/
public function setBaseUrl($baseUrl)
public function setBaseUrl(string $baseUrl): void
{
$this->baseUrl = $baseUrl;
}
Expand All @@ -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 [];
Expand Down

0 comments on commit 852af5c

Please sign in to comment.