Skip to content

Commit 6b7e7cc

Browse files
refactor(rector): apply safe modernizations in FileSearchProvider
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 9ec1006 commit 6b7e7cc

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

lib/Search/FileSearchProvider.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function getName(): string {
4646

4747
#[\Override]
4848
public function getOrder(string $route, array $routeParameters): int {
49-
if (strpos($route, Application::APP_ID . '.') === 0) {
49+
if (str_starts_with($route, Application::APP_ID . '.')) {
5050
return 0;
5151
}
5252
return 10;
@@ -68,9 +68,7 @@ public function search(IUser $user, ISearchQuery $query): SearchResult {
6868
return SearchResult::complete($this->l10n->t('LibreSign documents'), []);
6969
}
7070

71-
$results = array_map(function (File $file) use ($user) {
72-
return $this->formatResult($file, $user);
73-
}, $files);
71+
$results = array_map(fn (File $file) => $this->formatResult($file, $user), $files);
7472

7573
return SearchResult::paginated(
7674
$this->l10n->t('LibreSign documents'),

0 commit comments

Comments
 (0)