aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Setup/AbstractDatabase.php
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2020-03-26 16:35:30 +0100
committerGitHub <noreply@github.com>2020-03-26 16:35:30 +0100
commit0c3e2fac54602926cfa1a0965650481dcaf86743 (patch)
treeec20e0ffa2f86b9b54939a83a785407319f94559 /lib/private/Setup/AbstractDatabase.php
parent62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff)
parentb80ebc96748b45fd2e0ba9323308657c4b00b7ec (diff)
downloadnextcloud-server-0c3e2fac54602926cfa1a0965650481dcaf86743.tar.gz
nextcloud-server-0c3e2fac54602926cfa1a0965650481dcaf86743.zip
Merge pull request #20168 from nextcloud/techdebt/short-array-syntax
Use the short array syntax, everywhere
Diffstat (limited to 'lib/private/Setup/AbstractDatabase.php')
-rw-r--r--lib/private/Setup/AbstractDatabase.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/Setup/AbstractDatabase.php b/lib/private/Setup/AbstractDatabase.php
index d52aaa8882d..c3c873f2d8b 100644
--- a/lib/private/Setup/AbstractDatabase.php
+++ b/lib/private/Setup/AbstractDatabase.php
@@ -67,16 +67,16 @@ abstract class AbstractDatabase {
}
public function validate($config) {
- $errors = array();
+ $errors = [];
if(empty($config['dbuser']) && empty($config['dbname'])) {
- $errors[] = $this->trans->t("%s enter the database username and name.", array($this->dbprettyname));
+ $errors[] = $this->trans->t("%s enter the database username and name.", [$this->dbprettyname]);
} else if(empty($config['dbuser'])) {
- $errors[] = $this->trans->t("%s enter the database username.", array($this->dbprettyname));
+ $errors[] = $this->trans->t("%s enter the database username.", [$this->dbprettyname]);
} else if(empty($config['dbname'])) {
- $errors[] = $this->trans->t("%s enter the database name.", array($this->dbprettyname));
+ $errors[] = $this->trans->t("%s enter the database name.", [$this->dbprettyname]);
}
if(substr_count($config['dbname'], '.') >= 1) {
- $errors[] = $this->trans->t("%s you may not use dots in the database name", array($this->dbprettyname));
+ $errors[] = $this->trans->t("%s you may not use dots in the database name", [$this->dbprettyname]);
}
return $errors;
}
@@ -109,13 +109,13 @@ abstract class AbstractDatabase {
* @return \OC\DB\Connection
*/
protected function connect(array $configOverwrite = []) {
- $connectionParams = array(
+ $connectionParams = [
'host' => $this->dbHost,
'user' => $this->dbUser,
'password' => $this->dbPassword,
'tablePrefix' => $this->tablePrefix,
'dbname' => $this->dbName
- );
+ ];
// adding port support through installer
if (!empty($this->dbPort)) {