Fix implicit variable creation.

This commit is contained in:
Pol Dellaiera
2021-11-09 15:25:45 +01:00
parent a1b381a3ea
commit 5e5dcaefe7
21 changed files with 464 additions and 581 deletions

View File

@@ -139,7 +139,7 @@ class SearchApi
return $nq->getResult();
}
private function prepareProviders($rawResults)
private function prepareProviders(array $rawResults)
{
$metadatas = [];
foreach ($rawResults as $r) {
@@ -156,8 +156,10 @@ class SearchApi
}
}
private function buildResults($rawResults)
private function buildResults(array $rawResults): array
{
$items = [];
foreach ($rawResults as $r) {
foreach ($this->providers as $k => $p) {
if ($p->supportsResult($r['key'], $r['metadata'])) {
@@ -170,6 +172,6 @@ class SearchApi
}
}
return $items ?? [];
return $items;
}
}