Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 15:19:56 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 15:19:56 +0300
commitcaff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch)
tree186d494c2aea5dea7255d3584ef5d595fc6e6194 /core/Command/Maintenance
parentedf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff)
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/Command/Maintenance')
-rw-r--r--core/Command/Maintenance/Install.php2
-rw-r--r--core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php10
-rw-r--r--core/Command/Maintenance/Mimetype/UpdateDB.php1
-rw-r--r--core/Command/Maintenance/UpdateHtaccess.php1
4 files changed, 5 insertions, 9 deletions
diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php
index fa18ef721b2..b7557b55e81 100644
--- a/core/Command/Maintenance/Install.php
+++ b/core/Command/Maintenance/Install.php
@@ -92,7 +92,7 @@ class Install extends Command {
$this->printErrors($output, $errors);
// ignore the OS X setup warning
- if(count($errors) !== 1 ||
+ if (count($errors) !== 1 ||
(string)$errors[0]['error'] !== 'Mac OS X is not supported and Nextcloud will not work properly on this platform. Use it at your own risk! ') {
return 1;
}
diff --git a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php
index 249b899173e..01bac261cd4 100644
--- a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php
+++ b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php
@@ -27,8 +27,7 @@ declare(strict_types=1);
namespace OC\Core\Command\Maintenance\Mimetype;
-class GenerateMimetypeFileBuilder
-{
+class GenerateMimetypeFileBuilder {
/**
* Generate mime type list file
* @param $aliases
@@ -39,7 +38,7 @@ class GenerateMimetypeFileBuilder
$keys = array_filter(array_keys($aliases), function ($k) {
return $k[0] === '_';
});
- foreach($keys as $key) {
+ foreach ($keys as $key) {
unset($aliases[$key]);
}
@@ -47,7 +46,7 @@ class GenerateMimetypeFileBuilder
$dir = new \DirectoryIterator(\OC::$SERVERROOT.'/core/img/filetypes');
$files = [];
- foreach($dir as $fileInfo) {
+ foreach ($dir as $fileInfo) {
if ($fileInfo->isFile()) {
$file = preg_replace('/.[^.]*$/', '', $fileInfo->getFilename());
$files[] = $file;
@@ -61,7 +60,7 @@ class GenerateMimetypeFileBuilder
// Fetch all themes!
$themes = [];
$dirs = new \DirectoryIterator(\OC::$SERVERROOT.'/themes/');
- foreach($dirs as $dir) {
+ foreach ($dirs as $dir) {
//Valid theme dir
if ($dir->isFile() || $dir->isDot()) {
continue;
@@ -105,5 +104,4 @@ OC.MimeTypeList={
};
';
}
-
}
diff --git a/core/Command/Maintenance/Mimetype/UpdateDB.php b/core/Command/Maintenance/Mimetype/UpdateDB.php
index 5bb78d9a3f3..47b0b600777 100644
--- a/core/Command/Maintenance/Mimetype/UpdateDB.php
+++ b/core/Command/Maintenance/Mimetype/UpdateDB.php
@@ -32,7 +32,6 @@ use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class UpdateDB extends Command {
-
const DEFAULT_MIMETYPE = 'application/octet-stream';
/** @var IMimeTypeDetector */
diff --git a/core/Command/Maintenance/UpdateHtaccess.php b/core/Command/Maintenance/UpdateHtaccess.php
index 6397ed7aec4..7f143536bfa 100644
--- a/core/Command/Maintenance/UpdateHtaccess.php
+++ b/core/Command/Maintenance/UpdateHtaccess.php
@@ -30,7 +30,6 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class UpdateHtaccess extends Command {
-
protected function configure() {
$this
->setName('maintenance:update:htaccess')