From 14c996d98256de958da367297c3313e0fa7ef9a8 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Fri, 10 Apr 2020 10:35:09 +0200 Subject: Use elseif instead of else if Signed-off-by: Christoph Wurst --- build/integration/features/bootstrap/CommandLine.php | 2 +- build/integration/features/bootstrap/Sharing.php | 4 ++-- build/integration/features/bootstrap/TagsContext.php | 2 +- build/integration/features/bootstrap/WebDav.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'build') diff --git a/build/integration/features/bootstrap/CommandLine.php b/build/integration/features/bootstrap/CommandLine.php index 85b5b1e7464..ecce68f2973 100644 --- a/build/integration/features/bootstrap/CommandLine.php +++ b/build/integration/features/bootstrap/CommandLine.php @@ -124,7 +124,7 @@ trait CommandLine { $msg .= ' Exceptions: ' . implode(', ', $exceptions); } throw new \Exception($msg); - } else if (!empty($exceptions)) { + } elseif (!empty($exceptions)) { $msg = 'The command was successful but triggered exceptions: ' . implode(', ', $exceptions); throw new \Exception($msg); } diff --git a/build/integration/features/bootstrap/Sharing.php b/build/integration/features/bootstrap/Sharing.php index 762e0dcb045..854ce552e6e 100644 --- a/build/integration/features/bootstrap/Sharing.php +++ b/build/integration/features/bootstrap/Sharing.php @@ -616,11 +616,11 @@ trait Sharing { if ($contentExpected === 'A_NUMBER') { Assert::assertTrue(is_numeric((string)$returnedShare->$field), "Field '$field' is not a number: " . $returnedShare->$field); - } else if ($contentExpected === 'A_TOKEN') { + } elseif ($contentExpected === 'A_TOKEN') { // A token is composed by 15 characters from // ISecureRandom::CHAR_HUMAN_READABLE. Assert::assertRegExp('/^[abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789]{15}$/', (string)$returnedShare->$field, "Field '$field' is not a token"); - } else if (strpos($contentExpected, 'REGEXP ') === 0) { + } elseif (strpos($contentExpected, 'REGEXP ') === 0) { Assert::assertRegExp(substr($contentExpected, strlen('REGEXP ')), (string)$returnedShare->$field, "Field '$field' does not match"); } else { Assert::assertEquals($contentExpected, (string)$returnedShare->$field, "Field '$field' does not match"); diff --git a/build/integration/features/bootstrap/TagsContext.php b/build/integration/features/bootstrap/TagsContext.php index c5a18198f01..4cc558dbdad 100644 --- a/build/integration/features/bootstrap/TagsContext.php +++ b/build/integration/features/bootstrap/TagsContext.php @@ -302,7 +302,7 @@ class TagsContext implements \Behat\Behat\Context\Context { if ($can === 'can') { $expected = 'true'; - } else if ($can === 'cannot') { + } elseif ($can === 'cannot') { $expected = 'false'; } else { throw new \Exception('Invalid condition, must be "can" or "cannot"'); diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php index 49ff3d85c88..e9123b02904 100644 --- a/build/integration/features/bootstrap/WebDav.php +++ b/build/integration/features/bootstrap/WebDav.php @@ -88,7 +88,7 @@ trait WebDav { public function makeDavRequest($user, $method, $path, $headers, $body = null, $type = "files") { if ($type === "files") { $fullUrl = substr($this->baseUrl, 0, -4) . $this->getDavFilesPath($user) . "$path"; - } else if ($type === "uploads") { + } elseif ($type === "uploads") { $fullUrl = substr($this->baseUrl, 0, -4) . $this->davPath . "$path"; } $client = new GClient(); -- cgit v1.2.3