Skip to content

Commit c917e94

Browse files
committed
TASK: Add some additional type hints
1 parent 41cff65 commit c917e94

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Classes/Controller/SuggestController.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ public function initializeObject()
6767
* @param string $dimensionCombination
6868
* @return void
6969
* @throws QueryBuildingException
70+
* @throws \Neos\Flow\Persistence\Exception\IllegalObjectTypeException
7071
*/
71-
public function indexAction($term, $contextNodeIdentifier, $dimensionCombination = null)
72+
public function indexAction(string $term, string $contextNodeIdentifier, string $dimensionCombination = null): void
7273
{
7374
if ($this->elasticSearchClient === null) {
7475
throw new \RuntimeException('The SuggestController needs an ElasticSearchClient, it seems you run without the flowpack/elasticsearch-contentrepositoryadaptor package, though.', 1487189823);
@@ -106,7 +107,7 @@ public function indexAction($term, $contextNodeIdentifier, $dimensionCombination
106107
* @throws QueryBuildingException
107108
* @throws \Neos\Flow\Persistence\Exception\IllegalObjectTypeException
108109
*/
109-
protected function buildRequestForTerm($term, $contextNodeIdentifier, $dimensionCombination = null): string
110+
protected function buildRequestForTerm(string $term, string $contextNodeIdentifier, string $dimensionCombination = null): string
110111
{
111112
$cacheKey = $contextNodeIdentifier . '-' . md5($dimensionCombination);
112113
$termPlaceholder = '---term-soh2gufuNi---';
@@ -170,10 +171,10 @@ protected function buildRequestForTerm($term, $contextNodeIdentifier, $dimension
170171
/**
171172
* Extract autocomplete options
172173
*
173-
* @param $response
174+
* @param array $response
174175
* @return array
175176
*/
176-
protected function extractCompletions($response)
177+
protected function extractCompletions(array $response): array
177178
{
178179
$aggregations = $response['aggregations'] ?? [];
179180

0 commit comments

Comments
 (0)