aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workflowengine
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-03-28 16:13:19 +0100
committerCôme Chilliet <91878298+come-nc@users.noreply.github.com>2024-04-02 14:16:21 +0200
commitec5133b739eabc76271789504b4dbb91a534f552 (patch)
tree880b81f5ebd11b289c67e4bcdd1ecaa41aedbcb4 /apps/workflowengine
parentb074399a87e764f506550d64f6379738186355c6 (diff)
downloadnextcloud-server-ec5133b739eabc76271789504b4dbb91a534f552.tar.gz
nextcloud-server-ec5133b739eabc76271789504b4dbb91a534f552.zip
fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/workflowengine')
-rw-r--r--apps/workflowengine/lib/Helper/ScopeContext.php4
-rw-r--r--apps/workflowengine/tests/ManagerTest.php2
2 files changed, 3 insertions, 3 deletions
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')