summaryrefslogtreecommitdiffstats
path: root/lib/private/App
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 10:35:09 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 10:35:09 +0200
commit14c996d98256de958da367297c3313e0fa7ef9a8 (patch)
tree27074d5403b67cbaf59d7b7181481ebe70af5d9e /lib/private/App
parentd6e17fb01777866674129a5883c03642f4bfd4a5 (diff)
downloadnextcloud-server-14c996d98256de958da367297c3313e0fa7ef9a8.tar.gz
nextcloud-server-14c996d98256de958da367297c3313e0fa7ef9a8.zip
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/App')
-rw-r--r--lib/private/App/AppManager.php2
-rw-r--r--lib/private/App/CodeChecker/MigrationSchemaChecker.php14
-rw-r--r--lib/private/App/CompareVersion.php4
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php
index eaa203417b2..bf1e8492aa3 100644
--- a/lib/private/App/AppManager.php
+++ b/lib/private/App/AppManager.php
@@ -546,7 +546,7 @@ class AppManager implements IAppManager {
$info = $this->getAppInfo($appId);
if ($info === null) {
$incompatibleApps[] = ['id' => $appId];
- } else if (!\OC_App::isAppCompatible($version, $info)) {
+ } elseif (!\OC_App::isAppCompatible($version, $info)) {
$incompatibleApps[] = $info;
}
}
diff --git a/lib/private/App/CodeChecker/MigrationSchemaChecker.php b/lib/private/App/CodeChecker/MigrationSchemaChecker.php
index 8434dd72078..63e35e0647c 100644
--- a/lib/private/App/CodeChecker/MigrationSchemaChecker.php
+++ b/lib/private/App/CodeChecker/MigrationSchemaChecker.php
@@ -66,12 +66,12 @@ class MigrationSchemaChecker extends NodeVisitorAbstract {
$this->tableVariableNames[$node->var->name] = $node->expr->args[0]->value->value;
}
}
- } else if ($node->expr->name === 'getTable') {
+ } elseif ($node->expr->name === 'getTable') {
if (isset($node->expr->args[0]) && $node->expr->args[0]->value instanceof Node\Scalar\String_) {
$this->tableVariableNames[$node->var->name] = $node->expr->args[0]->value->value;
}
}
- } else if ($this->schemaVariableName !== null &&
+ } elseif ($this->schemaVariableName !== null &&
$node instanceof Node\Expr\MethodCall &&
$node->var instanceof Node\Expr\Variable &&
$node->var->name === $this->schemaVariableName) {
@@ -90,7 +90,7 @@ class MigrationSchemaChecker extends NodeVisitorAbstract {
/**
* Check columns and Indexes
*/
- } else if (!empty($this->tableVariableNames) &&
+ } elseif (!empty($this->tableVariableNames) &&
$node instanceof Node\Expr\MethodCall &&
$node->var instanceof Node\Expr\Variable &&
isset($this->tableVariableNames[$node->var->name])) {
@@ -123,7 +123,7 @@ class MigrationSchemaChecker extends NodeVisitorAbstract {
}
}
}
- } else if ($node->name === 'addIndex' ||
+ } elseif ($node->name === 'addIndex' ||
$node->name === 'addUniqueIndex' ||
$node->name === 'renameIndex' ||
$node->name === 'setPrimaryKey') {
@@ -139,7 +139,7 @@ class MigrationSchemaChecker extends NodeVisitorAbstract {
];
}
}
- } else if ($node->name === 'addForeignKeyConstraint') {
+ } elseif ($node->name === 'addForeignKeyConstraint') {
if (isset($node->args[4]) && $node->args[4]->value instanceof Node\Scalar\String_) {
if (!$this->checkNameLength($node->args[4]->value->value)) {
$this->errors[] = [
@@ -152,7 +152,7 @@ class MigrationSchemaChecker extends NodeVisitorAbstract {
];
}
}
- } else if ($node->name === 'renameColumn') {
+ } elseif ($node->name === 'renameColumn') {
$this->errors[] = [
'line' => $node->getLine(),
'disallowedToken' => 'Deprecated method',
@@ -166,7 +166,7 @@ class MigrationSchemaChecker extends NodeVisitorAbstract {
/**
* Find the schema
*/
- } else if ($node instanceof Node\Expr\Assign &&
+ } elseif ($node instanceof Node\Expr\Assign &&
$node->expr instanceof Node\Expr\FuncCall &&
$node->var instanceof Node\Expr\Variable &&
$node->expr->name instanceof Node\Expr\Variable &&
diff --git a/lib/private/App/CompareVersion.php b/lib/private/App/CompareVersion.php
index bf528e3f1b8..314db1eadd6 100644
--- a/lib/private/App/CompareVersion.php
+++ b/lib/private/App/CompareVersion.php
@@ -53,9 +53,9 @@ class CompareVersion {
if (preg_match(self::REGEX_MAJOR, $required) === 1) {
return $this->compareMajor($actual, $required, $comparator);
- } else if (preg_match(self::REGEX_MAJOR_MINOR, $required) === 1) {
+ } elseif (preg_match(self::REGEX_MAJOR_MINOR, $required) === 1) {
return $this->compareMajorMinor($actual, $required, $comparator);
- } else if (preg_match(self::REGEX_MAJOR_MINOR_PATCH, $required) === 1) {
+ } elseif (preg_match(self::REGEX_MAJOR_MINOR_PATCH, $required) === 1) {
return $this->compareMajorMinorPatch($actual, $required, $comparator);
} else {
throw new InvalidArgumentException('required version is invalid');