@@ -106,7 +106,7 @@ |
||
106 | 106 | * Returns sub aggregation. |
107 | 107 | * @param string $name Aggregation name to return. |
108 | 108 | * |
109 | - * @return AbstractAggregation|null |
|
109 | + * @return BuilderInterface|null |
|
110 | 110 | */ |
111 | 111 | public function getAggregation($name) |
112 | 112 | { |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | * - should. |
266 | 266 | * @param string $key |
267 | 267 | * |
268 | - * @return int Key of post filter. |
|
268 | + * @return Search Key of post filter. |
|
269 | 269 | */ |
270 | 270 | public function addPostFilter(BuilderInterface $filter, $boolType = BoolFilter::MUST, $key = null) |
271 | 271 | { |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | * |
356 | 356 | * @param Highlight $highlight |
357 | 357 | * |
358 | - * @return int Key of highlight. |
|
358 | + * @return Search Key of highlight. |
|
359 | 359 | */ |
360 | 360 | public function addHighlight($highlight) |
361 | 361 | { |
@@ -381,12 +381,12 @@ discard block |
||
381 | 381 | } |
382 | 382 | |
383 | 383 | /** |
384 | - * Adds suggest into search. |
|
385 | - * |
|
386 | - * @param BuilderInterface $suggest |
|
387 | - * |
|
388 | - * @return $this |
|
389 | - */ |
|
384 | + * Adds suggest into search. |
|
385 | + * |
|
386 | + * @param BuilderInterface $suggest |
|
387 | + * |
|
388 | + * @return $this |
|
389 | + */ |
|
390 | 390 | public function addSuggest(BuilderInterface $suggest) |
391 | 391 | { |
392 | 392 | $this->getEndpoint(SuggestEndpoint::NAME)->add($suggest, $suggest->getName()); |
@@ -395,10 +395,10 @@ discard block |
||
395 | 395 | } |
396 | 396 | |
397 | 397 | /** |
398 | - * Returns all suggests. |
|
399 | - * |
|
400 | - * @return BuilderInterface[] |
|
401 | - */ |
|
398 | + * Returns all suggests. |
|
399 | + * |
|
400 | + * @return BuilderInterface[] |
|
401 | + */ |
|
402 | 402 | public function getSuggests() |
403 | 403 | { |
404 | 404 | return $this->getEndpoint(SuggestEndpoint::NAME)->getAll(); |
@@ -105,7 +105,7 @@ |
||
105 | 105 | return array_filter( |
106 | 106 | $this->bag, |
107 | 107 | /** @var BuilderInterface $builder */ |
108 | - function (BuilderInterface $builder) use ($type) { |
|
108 | + function(BuilderInterface $builder) use ($type) { |
|
109 | 109 | return $type === null || $builder->getType() == $type; |
110 | 110 | } |
111 | 111 | ); |
@@ -162,7 +162,7 @@ |
||
162 | 162 | public function addRandomFunction($seed = null, BuilderInterface $filter = null) |
163 | 163 | { |
164 | 164 | $function = [ |
165 | - 'random_score' => $seed ? [ 'seed' => $seed ] : new \stdClass(), |
|
165 | + 'random_score' => $seed ? ['seed' => $seed] : new \stdClass(), |
|
166 | 166 | ]; |
167 | 167 | |
168 | 168 | $this->applyFilter($function, $filter); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | if (!empty($filteredData)) { |
59 | 59 | uasort( |
60 | 60 | $filteredData, |
61 | - function (OrderedNormalizerInterface $a, OrderedNormalizerInterface $b) { |
|
61 | + function(OrderedNormalizerInterface $a, OrderedNormalizerInterface $b) { |
|
62 | 62 | return $a->getOrder() > $b->getOrder(); |
63 | 63 | } |
64 | 64 | ); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | { |
81 | 81 | return array_filter( |
82 | 82 | $array, |
83 | - function ($value) { |
|
83 | + function($value) { |
|
84 | 84 | return $value instanceof OrderedNormalizerInterface; |
85 | 85 | } |
86 | 86 | ); |
@@ -221,7 +221,7 @@ |
||
221 | 221 | * Checks if all required parameters are set. |
222 | 222 | * |
223 | 223 | * @param array $data |
224 | - * @param array $required |
|
224 | + * @param string[] $required |
|
225 | 225 | * |
226 | 226 | * @throws \LogicException |
227 | 227 | */ |
@@ -131,7 +131,7 @@ |
||
131 | 131 | 'size' => $this->getSize(), |
132 | 132 | 'from' => $this->getFrom(), |
133 | 133 | ], |
134 | - function ($val) { |
|
134 | + function($val) { |
|
135 | 135 | return (($val || is_array($val) || ($val || is_numeric($val)))); |
136 | 136 | } |
137 | 137 | ); |
@@ -131,7 +131,7 @@ |
||
131 | 131 | 'size' => $this->getSize(), |
132 | 132 | 'from' => $this->getFrom(), |
133 | 133 | ], |
134 | - function ($val) { |
|
134 | + function($val) { |
|
135 | 135 | return (($val || is_array($val) || ($val || is_numeric($val)))); |
136 | 136 | } |
137 | 137 | ); |
@@ -131,7 +131,7 @@ |
||
131 | 131 | 'size' => $this->getSize(), |
132 | 132 | 'from' => $this->getFrom(), |
133 | 133 | ], |
134 | - function ($val) { |
|
134 | + function($val) { |
|
135 | 135 | return (($val || is_array($val) || ($val || is_numeric($val)))); |
136 | 136 | } |
137 | 137 | ); |
@@ -131,7 +131,7 @@ |
||
131 | 131 | 'size' => $this->getSize(), |
132 | 132 | 'from' => $this->getFrom(), |
133 | 133 | ], |
134 | - function ($val) { |
|
134 | + function($val) { |
|
135 | 135 | return (($val || is_array($val) || ($val || is_numeric($val)))); |
136 | 136 | } |
137 | 137 | ); |