fix(files_external): boolean comparison of array

To check if there are no missing required dependencies we need to check
if the required dependencies are **empty** because `!array` is still
true.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2026-02-26 14:14:03 +01:00 committed by Kent Delante
parent 6fbe98ce2b
commit ec3c07dfde
2 changed files with 2 additions and 2 deletions

View file

@ -26,7 +26,7 @@ trait DependencyTrait {
*
* @return MissingDependency[] Unsatisfied required dependencies
*/
public function checkRequiredDependencies() {
public function checkRequiredDependencies(): array {
return array_filter(
$this->checkDependencies(),
fn (MissingDependency $dependency) => !$dependency->isOptional()

View file

@ -178,7 +178,7 @@ class BackendService {
* @return Backend[]
*/
public function getAvailableBackends() {
return array_filter($this->getBackends(), fn (Backend $backend) => !$backend->checkRequiredDependencies());
return array_filter($this->getBackends(), fn (Backend $backend) => empty($backend->checkRequiredDependencies()));
}
/**