aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2023-06-27 14:08:05 +0200
committerMarcel Klehr <mklehr@gmx.net>2023-07-07 13:39:10 +0200
commit8e4aa92167c4856dac42bae1ae4d8f5d653a2735 (patch)
treeec4ffd9665eda12665001a90b516147ad7745fc2 /lib
parentfb55afc9ffea906432e52def8bacb6f902afe220 (diff)
downloadnextcloud-server-8e4aa92167c4856dac42bae1ae4d8f5d653a2735.tar.gz
nextcloud-server-8e4aa92167c4856dac42bae1ae4d8f5d653a2735.zip
Apply suggestions from code review
Co-authored-by: Daniel <mail@danielkesselberg.de> Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/LanguageModel/LanguageModelManager.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/LanguageModel/LanguageModelManager.php b/lib/private/LanguageModel/LanguageModelManager.php
index 09bf9ae5d15..340116e7d71 100644
--- a/lib/private/LanguageModel/LanguageModelManager.php
+++ b/lib/private/LanguageModel/LanguageModelManager.php
@@ -68,7 +68,7 @@ class LanguageModelManager implements ILanguageModelManager {
if ($context === null) {
return false;
}
- return !empty($context->getSpeechToTextProviders());
+ return count($context->getSpeechToTextProviders()) > 0;
}
/**
@@ -93,7 +93,7 @@ class LanguageModelManager implements ILanguageModelManager {
}
public function canHandleTask(ILanguageModelTask $task): bool {
- return !empty(array_filter($this->getAvailableTasks(), fn ($class) => $task instanceof $class));
+ return count(array_filter($this->getAvailableTasks(), fn ($class) => $task instanceof $class)) > 0;
}
/**