diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 09:30:18 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 16:34:56 +0100 |
commit | b80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch) | |
tree | ec20e0ffa2f86b9b54939a83a785407319f94559 /lib/private/Repair | |
parent | 62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff) | |
download | nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.tar.gz nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.zip |
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Repair')
-rw-r--r-- | lib/private/Repair/CleanTags.php | 2 | ||||
-rw-r--r-- | lib/private/Repair/Collation.php | 2 | ||||
-rw-r--r-- | lib/private/Repair/RepairMimeTypes.php | 18 |
3 files changed, 11 insertions, 11 deletions
diff --git a/lib/private/Repair/CleanTags.php b/lib/private/Repair/CleanTags.php index d579068e163..1c50ee2505a 100644 --- a/lib/private/Repair/CleanTags.php +++ b/lib/private/Repair/CleanTags.php @@ -186,7 +186,7 @@ class CleanTags implements IRepairStep { ); $result = $qb->execute(); - $orphanItems = array(); + $orphanItems = []; while ($row = $result->fetch()) { $orphanItems[] = (int) $row[$deleteId]; } diff --git a/lib/private/Repair/Collation.php b/lib/private/Repair/Collation.php index 891fdd99433..8477d5d0bc9 100644 --- a/lib/private/Repair/Collation.php +++ b/lib/private/Repair/Collation.php @@ -126,7 +126,7 @@ class Collation implements IRepairStep { " WHERE TABLE_SCHEMA = ?" . " AND (COLLATION_NAME <> '" . $characterSet . "_bin' OR CHARACTER_SET_NAME <> '" . $characterSet . "')" . " AND TABLE_NAME LIKE '*PREFIX*%'", - array($dbName) + [$dbName] ); $rows = $statement->fetchAll(); $result = []; diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index c3ad7be72da..0ced7848df4 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -90,46 +90,46 @@ class RepairMimeTypes implements IRepairStep { private function updateMimetypes($updatedMimetypes) { if (empty($this->folderMimeTypeId)) { - $result = \OC_DB::executeAudited(self::getIdStmt(), array('httpd/unix-directory')); + $result = \OC_DB::executeAudited(self::getIdStmt(), ['httpd/unix-directory']); $this->folderMimeTypeId = (int)$result->fetchOne(); } $count = 0; foreach ($updatedMimetypes as $extension => $mimetype) { - $result = \OC_DB::executeAudited(self::existsStmt(), array($mimetype)); + $result = \OC_DB::executeAudited(self::existsStmt(), [$mimetype]); $exists = $result->fetchOne(); if (!$exists) { // insert mimetype - \OC_DB::executeAudited(self::insertStmt(), array($mimetype)); + \OC_DB::executeAudited(self::insertStmt(), [$mimetype]); } // get target mimetype id - $result = \OC_DB::executeAudited(self::getIdStmt(), array($mimetype)); + $result = \OC_DB::executeAudited(self::getIdStmt(), [$mimetype]); $mimetypeId = $result->fetchOne(); // change mimetype for files with x extension - $count += \OC_DB::executeAudited(self::updateByNameStmt(), array($mimetypeId, $this->folderMimeTypeId, $mimetypeId, '%.' . $extension)); + $count += \OC_DB::executeAudited(self::updateByNameStmt(), [$mimetypeId, $this->folderMimeTypeId, $mimetypeId, '%.' . $extension]); } return $count; } private function introduceImageTypes() { - $updatedMimetypes = array( + $updatedMimetypes = [ 'jp2' => 'image/jp2', 'webp' => 'image/webp', - ); + ]; return $this->updateMimetypes($updatedMimetypes); } private function introduceWindowsProgramTypes() { - $updatedMimetypes = array( + $updatedMimetypes = [ 'htaccess' => 'text/plain', 'bat' => 'application/x-msdos-program', 'cmd' => 'application/cmd', - ); + ]; return $this->updateMimetypes($updatedMimetypes); } |