Merge pull request #42809 from nextcloud/fix/text-processing

fix(OCP\TextProcessing): add missing return statement, inline return
This commit is contained in:
Alexander Piskun 2024-02-13 00:13:24 +03:00 committed by GitHub
commit 7f4aaab809
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -287,7 +287,7 @@ class Manager implements IManager {
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);
@ -295,7 +295,6 @@ class Manager implements IManager {
}
}
}
$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)));
}
}