Skip to content

Commit

Permalink
Merge pull request #42809 from nextcloud/fix/text-processing
Browse files Browse the repository at this point in the history
fix(OCP\TextProcessing): add missing return statement, inline return
  • Loading branch information
bigcat88 authored Feb 12, 2024
2 parents c1fc1b2 + 1625379 commit 7f4aaab
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 7f4aaab

Please sign in to comment.