mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
fix new phpstan issues
This commit is contained in:
@@ -113,27 +113,23 @@ class EventSearch extends AbstractSearch
|
||||
]
|
||||
);
|
||||
}
|
||||
// format is "json"
|
||||
$results = [];
|
||||
$search = $this->search($terms, $start, $limit, $options);
|
||||
|
||||
if ('json' === $format) {
|
||||
$results = [];
|
||||
$search = $this->search($terms, $start, $limit, $options);
|
||||
|
||||
foreach ($search as $item) {
|
||||
$results[] = [
|
||||
'id' => $item->getId(),
|
||||
'text' => $item->getDate()->format('d/m/Y, H:i') . ' → ' .
|
||||
// $item->getType()->getName()['fr'] . ': ' . // display the type of event
|
||||
$item->getName(),
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'results' => $results,
|
||||
'pagination' => [
|
||||
'more' => $paginator->hasNextPage(),
|
||||
],
|
||||
foreach ($search as $item) {
|
||||
$results[] = [
|
||||
'id' => $item->getId(),
|
||||
'text' => $item->getDate()->format('d/m/Y, H:i') . ' → ' .
|
||||
// $item->getType()->getName()['fr'] . ': ' . // display the type of event
|
||||
$item->getName(),
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'results' => $results,
|
||||
'more' => $paginator->hasNextPage(),
|
||||
];
|
||||
}
|
||||
|
||||
public function supports($domain, $format)
|
||||
|
Reference in New Issue
Block a user