You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Classes/EelHelper/SuggestionIndexHelper.php
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
1
<?php
2
+
declare(strict_types=1);
3
+
2
4
namespaceFlowpack\SearchPlugin\EelHelper;
3
5
4
6
/*
@@ -24,10 +26,9 @@ class SuggestionIndexHelper implements ProtectedContextAwareInterface
24
26
{
25
27
/**
26
28
* @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.
29
29
* @param int $weight A positive integer or a string containing a positive integer, which defines a weight and allows you to rank your suggestions.
30
30
* @return array
31
+
* @throws Exception
31
32
*/
32
33
publicfunctionbuild($input, $weight = 1)
33
34
{
@@ -44,7 +45,7 @@ public function build($input, $weight = 1)
44
45
*/
45
46
protectedfunctionprepareInput($input)
46
47
{
47
-
$process = function ($input) {
48
+
$process = staticfunction ($input) {
48
49
if (!\is_string($input)) {
49
50
thrownewException('Only string are supported as input', 1512733297);
0 commit comments