@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | /** |
| 22 | 22 | * Set the current locale. |
| 23 | 23 | * |
| 24 | - * @param $locale |
|
| 24 | + * @param string $locale |
|
| 25 | 25 | * @return $this |
| 26 | 26 | */ |
| 27 | 27 | abstract public function setLocale($locale); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | /** |
| 37 | 37 | * Set the fallback locale. |
| 38 | 38 | * |
| 39 | - * @param $locale |
|
| 39 | + * @param string $locale |
|
| 40 | 40 | * @return $this |
| 41 | 41 | */ |
| 42 | 42 | abstract public function setFallbackLocale($locale); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | /** |
| 55 | 55 | * Forget the search cache as whole or by key. |
| 56 | 56 | * |
| 57 | - * @return array |
|
| 57 | + * @return Intl |
|
| 58 | 58 | */ |
| 59 | 59 | public function forgetSearchCache($cacheKey = null) |
| 60 | 60 | { |
@@ -84,15 +84,15 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | $results = $this->all(); |
| 86 | 86 | |
| 87 | - $filterCallback = function ($name) use ($includeKeywords, $excludeKeywords) { |
|
| 87 | + $filterCallback = function($name) use ($includeKeywords, $excludeKeywords) { |
|
| 88 | 88 | $includeCondition = $excludeCondition = true; |
| 89 | 89 | |
| 90 | - if (! empty($includeKeywords)) { |
|
| 91 | - $includeCondition = (bool) preg_match('/'.implode('|', $includeKeywords).'/', $name); |
|
| 90 | + if (!empty($includeKeywords)) { |
|
| 91 | + $includeCondition = (bool) preg_match('/' . implode('|', $includeKeywords) . '/', $name); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - if (! empty($excludeKeywords)) { |
|
| 95 | - $excludeCondition = ! (bool) preg_match('/'.implode('|', $excludeKeywords).'/', $name); |
|
| 94 | + if (!empty($excludeKeywords)) { |
|
| 95 | + $excludeCondition = !(bool) preg_match('/' . implode('|', $excludeKeywords) . '/', $name); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | return $includeCondition && $excludeCondition; |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | foreach ($keywords as $keyword) { |
| 121 | 121 | if (Str::startsWith($keyword, ['-', '\\-'])) { |
| 122 | 122 | $excludeKeywords[] = str_replace(['-', '\\'], '', $keyword); |
| 123 | - } else { |
|
| 123 | + } else { |
|
| 124 | 124 | $includeKeywords[] = $keyword; |
| 125 | 125 | } |
| 126 | 126 | } |
@@ -120,7 +120,7 @@ |
||
| 120 | 120 | foreach ($keywords as $keyword) { |
| 121 | 121 | if (Str::startsWith($keyword, ['-', '\\-'])) { |
| 122 | 122 | $excludeKeywords[] = str_replace(['-', '\\'], '', $keyword); |
| 123 | - } else { |
|
| 123 | + } else { |
|
| 124 | 124 | $includeKeywords[] = $keyword; |
| 125 | 125 | } |
| 126 | 126 | } |