@@ -30,7 +30,7 @@ |
||
| 30 | 30 | * Finder constructor. |
| 31 | 31 | * |
| 32 | 32 | * @param string $needle |
| 33 | - * @param array $haystack |
|
| 33 | + * @param string[] $haystack |
|
| 34 | 34 | * @return void |
| 35 | 35 | */ |
| 36 | 36 | public function __construct($needle, $haystack) |
@@ -57,8 +57,8 @@ |
||
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | // Apply threshold when set. |
| 60 | - if(!is_null($this->threshold)){ |
|
| 61 | - $sorted_haystack = array_filter($sorted_haystack, function ($score){ |
|
| 60 | + if (!is_null($this->threshold)) { |
|
| 61 | + $sorted_haystack = array_filter($sorted_haystack, function($score) { |
|
| 62 | 62 | return $score <= $this->threshold; |
| 63 | 63 | }); |
| 64 | 64 | } |