Skip to content

Commit

Permalink
fix missing return statement, inline return
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
  • Loading branch information
andrey18106 authored and blizzz committed Feb 12, 2024
1 parent c1fc1b2 commit 1625379
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/private/TextProcessing/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,14 @@ public function getPreferredProviders(OCPTask $task): array {
if ($provider instanceof IProviderWithId) {
return $provider->getId() === $preferences[$task->getType()];
}
$provider::class === $preferences[$task->getType()];
return $provider::class === $preferences[$task->getType()];
})));
if ($provider !== false) {
$providers = array_filter($providers, fn ($p) => $p !== $provider);
array_unshift($providers, $provider);
}
}
}
$providers = array_values(array_filter($providers, fn (IProvider $provider) => $task->canUseProvider($provider)));
return $providers;
return array_values(array_filter($providers, fn (IProvider $provider) => $task->canUseProvider($provider)));
}
}

0 comments on commit 1625379

Please sign in to comment.