aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/lib/Check/AbstractStringCheck.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/workflowengine/lib/Check/AbstractStringCheck.php')
-rw-r--r--apps/workflowengine/lib/Check/AbstractStringCheck.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/apps/workflowengine/lib/Check/AbstractStringCheck.php b/apps/workflowengine/lib/Check/AbstractStringCheck.php
index 1c544c8c000..d92e9901365 100644
--- a/apps/workflowengine/lib/Check/AbstractStringCheck.php
+++ b/apps/workflowengine/lib/Check/AbstractStringCheck.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -14,14 +15,12 @@ abstract class AbstractStringCheck implements ICheck {
/** @var array[] Nested array: [Pattern => [ActualValue => Regex Result]] */
protected $matches;
- /** @var IL10N */
- protected $l;
-
/**
* @param IL10N $l
*/
- public function __construct(IL10N $l) {
- $this->l = $l;
+ public function __construct(
+ protected IL10N $l,
+ ) {
}
/**
@@ -70,8 +69,8 @@ abstract class AbstractStringCheck implements ICheck {
throw new \UnexpectedValueException($this->l->t('The given operator is invalid'), 1);
}
- if (in_array($operator, ['matches', '!matches']) &&
- @preg_match($value, null) === false) {
+ if (in_array($operator, ['matches', '!matches'])
+ && @preg_match($value, null) === false) {
throw new \UnexpectedValueException($this->l->t('The given regular expression is invalid'), 2);
}
}