diff options
Diffstat (limited to 'apps/workflowengine')
6 files changed, 8 insertions, 8 deletions
diff --git a/apps/workflowengine/lib/AppInfo/Application.php b/apps/workflowengine/lib/AppInfo/Application.php index 289ac167ac5..d75b025b3f4 100644 --- a/apps/workflowengine/lib/AppInfo/Application.php +++ b/apps/workflowengine/lib/AppInfo/Application.php @@ -112,7 +112,7 @@ class Application extends \OCP\AppFramework\App { if ($event instanceof Event) { $entity->prepareRuleMatcher($ruleMatcher, $eventName, $event); $operation->onEvent($eventName, $event, $ruleMatcher); - } else if ($entity instanceof IEntityCompat && $operation instanceof IOperationCompat) { + } elseif ($entity instanceof IEntityCompat && $operation instanceof IOperationCompat) { // TODO: Remove this block (and the compat classes) in the first major release in 2023 $entity->prepareRuleMatcherCompat($ruleMatcher, $eventName, $event); $operation->onEventCompat($eventName, $event, $ruleMatcher); diff --git a/apps/workflowengine/lib/Check/AbstractStringCheck.php b/apps/workflowengine/lib/Check/AbstractStringCheck.php index e0de77a852b..f42da048f21 100644 --- a/apps/workflowengine/lib/Check/AbstractStringCheck.php +++ b/apps/workflowengine/lib/Check/AbstractStringCheck.php @@ -64,7 +64,7 @@ abstract class AbstractStringCheck implements ICheck { protected function executeStringCheck($operator, $checkValue, $actualValue) { if ($operator === 'is') { return $checkValue === $actualValue; - } else if ($operator === '!is') { + } elseif ($operator === '!is') { return $checkValue !== $actualValue; } else { $match = $this->match($checkValue, $actualValue); diff --git a/apps/workflowengine/lib/Check/FileSystemTags.php b/apps/workflowengine/lib/Check/FileSystemTags.php index 03a55b3caca..845fb3ee718 100644 --- a/apps/workflowengine/lib/Check/FileSystemTags.php +++ b/apps/workflowengine/lib/Check/FileSystemTags.php @@ -134,7 +134,7 @@ class FileSystemTags implements ICheck, IFileCheck { $parentIds = []; if ($path !== $this->dirname($path)) { $parentIds = $this->getFileIds($cache, $this->dirname($path), $isExternalStorage); - } else if (!$isExternalStorage) { + } elseif (!$isExternalStorage) { return []; } diff --git a/apps/workflowengine/lib/Check/RequestRemoteAddress.php b/apps/workflowengine/lib/Check/RequestRemoteAddress.php index 61022a2513b..00d3d9b2577 100644 --- a/apps/workflowengine/lib/Check/RequestRemoteAddress.php +++ b/apps/workflowengine/lib/Check/RequestRemoteAddress.php @@ -53,9 +53,9 @@ class RequestRemoteAddress implements ICheck { if ($operator === 'matchesIPv4') { return $this->matchIPv4($actualValue, $decodedValue[0], $decodedValue[1]); - } else if ($operator === '!matchesIPv4') { + } elseif ($operator === '!matchesIPv4') { return !$this->matchIPv4($actualValue, $decodedValue[0], $decodedValue[1]); - } else if ($operator === 'matchesIPv6') { + } elseif ($operator === 'matchesIPv6') { return $this->matchIPv6($actualValue, $decodedValue[0], $decodedValue[1]); } else { return !$this->matchIPv6($actualValue, $decodedValue[0], $decodedValue[1]); diff --git a/apps/workflowengine/lib/Service/RuleMatcher.php b/apps/workflowengine/lib/Service/RuleMatcher.php index e5dbc08ce1f..b022bafb11a 100644 --- a/apps/workflowengine/lib/Service/RuleMatcher.php +++ b/apps/workflowengine/lib/Service/RuleMatcher.php @@ -220,7 +220,7 @@ class RuleMatcher implements IRuleMatcher { list($entity, $subject) = $entityInfo; $checkInstance->setEntitySubject($entity, $subject); } - } else if(!$checkInstance instanceof ICheck) { + } elseif(!$checkInstance instanceof ICheck) { // Check is invalid throw new \UnexpectedValueException($this->l->t('Check %s is invalid or does not exist', $check['class'])); } diff --git a/apps/workflowengine/tests/ManagerTest.php b/apps/workflowengine/tests/ManagerTest.php index cad4be174cf..191e7bfec84 100644 --- a/apps/workflowengine/tests/ManagerTest.php +++ b/apps/workflowengine/tests/ManagerTest.php @@ -287,7 +287,7 @@ class ManagerTest extends TestCase { ->willReturnCallback(function ($class) { if(substr($class, -2) === 'Op') { return $this->createMock(IOperation::class); - } else if($class === File::class) { + } elseif($class === File::class) { return $this->getMockBuilder(File::class) ->setConstructorArgs([ $this->l, @@ -424,7 +424,7 @@ class ManagerTest extends TestCase { $entityTypeCounts = array_reduce($entities, function (array $carry, IEntity $entity) { if($entity instanceof File) $carry[0]++; - else if($entity instanceof IEntity) $carry[1]++; + elseif($entity instanceof IEntity) $carry[1]++; return $carry; }, [0, 0]); |