nextcloud/apps/workflowengine/lib/Controller/GlobalWorkflowsController.php
Carl Schwan 6154bfa823 chore(psalm): Fix most issues with the workflowengine
This found a real bug where we were catching an Doctrine exception
instead of a OCP\DB\Exception. This will be backported separately.

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-09-17 09:57:10 +02:00

24 lines
587 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\WorkflowEngine\Controller;
use OCA\WorkflowEngine\Helper\ScopeContext;
use OCP\WorkflowEngine\IManager;
class GlobalWorkflowsController extends AWorkflowController {
private ?ScopeContext $scopeContext = null;
protected function getScopeContext(): ScopeContext {
if ($this->scopeContext === null) {
$this->scopeContext = new ScopeContext(IManager::SCOPE_ADMIN);
}
return $this->scopeContext;
}
}