chore: Silence psalm false-positives

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2026-05-11 18:44:52 +02:00
parent 68f417b354
commit 8acc505aef
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

View file

@ -141,6 +141,7 @@ class Manager implements IManager {
public function runTask(OCPTask $task): string {
// try to run a task processing task if possible
$taskTypeClass = $task->getType();
/** @psalm-suppress InvalidArrayOffset false-positive */
if (isset(self::COMPATIBLE_TASK_TYPES[$taskTypeClass]) && isset($this->taskProcessingManager->getAvailableTaskTypes()[self::COMPATIBLE_TASK_TYPES[$taskTypeClass]])) {
try {
$taskProcessingTaskTypeId = self::COMPATIBLE_TASK_TYPES[$taskTypeClass];
@ -229,6 +230,7 @@ class Manager implements IManager {
}
$task->setStatus(OCPTask::STATUS_SCHEDULED);
$providers = $this->getPreferredProviders($task);
/** @psalm-suppress InvalidArrayOffset false-positive */
$equivalentTaskProcessingTypeAvailable = (
isset(self::COMPATIBLE_TASK_TYPES[$task->getType()])
&& isset($this->taskProcessingManager->getAvailableTaskTypes()[self::COMPATIBLE_TASK_TYPES[$task->getType()]])