Skip to content

Commit 0cb21df

Browse files
committed
TASK: Improve code style
1 parent 5e6b328 commit 0cb21df

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Classes/EelHelper/SuggestionIndexHelper.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<?php
2+
declare(strict_types=1);
3+
24
namespace Flowpack\SearchPlugin\EelHelper;
35

46
/*
@@ -24,10 +26,9 @@ class SuggestionIndexHelper implements ProtectedContextAwareInterface
2426
{
2527
/**
2628
* @param string|array $input The input to store, this can be a an array of strings or just a string. This field is mandatory.
27-
* @param string $output The result is de-duplicated if several documents have the same output, i.e. only one is returned as part of the suggest result.
28-
* @param array $payload An arbitrary JSON object, which is simply returned in the suggest option.
2929
* @param int $weight A positive integer or a string containing a positive integer, which defines a weight and allows you to rank your suggestions.
3030
* @return array
31+
* @throws Exception
3132
*/
3233
public function build($input, $weight = 1)
3334
{
@@ -44,7 +45,7 @@ public function build($input, $weight = 1)
4445
*/
4546
protected function prepareInput($input)
4647
{
47-
$process = function ($input) {
48+
$process = static function ($input) {
4849
if (!\is_string($input)) {
4950
throw new Exception('Only string are supported as input', 1512733297);
5051
}

0 commit comments

Comments
 (0)