From ec5133b739eabc76271789504b4dbb91a534f552 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Thu, 28 Mar 2024 16:13:19 +0100 Subject: fix: Apply new coding standard to all files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/workflowengine/lib/Helper/ScopeContext.php | 4 ++-- apps/workflowengine/tests/ManagerTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/workflowengine') diff --git a/apps/workflowengine/lib/Helper/ScopeContext.php b/apps/workflowengine/lib/Helper/ScopeContext.php index 1927aac6b40..01c7974cf2f 100644 --- a/apps/workflowengine/lib/Helper/ScopeContext.php +++ b/apps/workflowengine/lib/Helper/ScopeContext.php @@ -36,7 +36,7 @@ class ScopeContext { /** @var string */ private $hash; - public function __construct(int $scope, string $scopeId = null) { + public function __construct(int $scope, ?string $scopeId = null) { $this->scope = $this->evaluateScope($scope); $this->scopeId = $this->evaluateScopeId($scopeId); } @@ -48,7 +48,7 @@ class ScopeContext { throw new \InvalidArgumentException('Invalid scope'); } - private function evaluateScopeId(string $scopeId = null): string { + private function evaluateScopeId(?string $scopeId = null): string { if ($this->scope === IManager::SCOPE_USER && trim((string)$scopeId) === '') { throw new \InvalidArgumentException('user scope requires a user id'); diff --git a/apps/workflowengine/tests/ManagerTest.php b/apps/workflowengine/tests/ManagerTest.php index a484a828492..890eba99dac 100644 --- a/apps/workflowengine/tests/ManagerTest.php +++ b/apps/workflowengine/tests/ManagerTest.php @@ -121,7 +121,7 @@ class ManagerTest extends TestCase { /** * @return MockObject|ScopeContext */ - protected function buildScope(string $scopeId = null): MockObject { + protected function buildScope(?string $scopeId = null): MockObject { $scopeContext = $this->createMock(ScopeContext::class); $scopeContext->expects($this->any()) ->method('getScope') -- cgit v1.2.3