Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Mar 23, 2021
1 parent 834c15b commit 576a84d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Field extends Column implements FieldContract
public static function make($name)
{
if ($name instanceof static) {
return tap(new static($name), function ($field) use ($name) {
return \tap(new static($name), static function ($field) use ($name) {
$field->wildcardSearching = $name->wildcardSearching;
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/Keyword.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function handle(Contracts\SearchFilter $filter): array
if ($filter instanceof Contracts\Keyword\AsExactValue) {
return [$this->getValue()];
} elseif ($filter instanceof Contracts\Keyword\AsLowerCase) {
return \collect($this->all())->transform(function ($keyword) {
return \collect($this->all())->transform(static function ($keyword) {
return Str::lower($keyword);
})->all();
}
Expand Down Expand Up @@ -102,7 +102,7 @@ public static function searchable(string $text, ?string $wildcard = '*', ?string
return [$text];
} elseif (! Str::contains($text, \array_filter([$wildcard, $replacement])) && $wildcardSearching === true) {
return \collect(static::$defaultSearchVariations)
->map(function ($string) use ($text) {
->map(static function ($string) use ($text) {
return Str::replaceFirst('{keyword}', $text, $string);
})->all();
}
Expand Down

0 comments on commit 576a84d

Please sign in to comment.