From caff1023ea72bb2ea94130e18a2a6e2ccf819e5f Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Fri, 10 Apr 2020 14:19:56 +0200 Subject: 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 --- core/Migrations/Version13000Date20170718121200.php | 1 - core/Migrations/Version13000Date20170926101637.php | 1 - core/Migrations/Version14000Date20180518120534.php | 1 - core/Migrations/Version14000Date20180522074438.php | 3 --- core/Migrations/Version14000Date20180626223656.php | 2 +- core/Migrations/Version14000Date20180710092004.php | 1 - core/Migrations/Version15000Date20180926101451.php | 1 - core/Migrations/Version15000Date20181029084625.php | 1 - core/Migrations/Version16000Date20190207141427.php | 1 - core/Migrations/Version17000Date20190514105811.php | 2 +- core/Migrations/Version18000Date20191014105105.php | 1 - core/Migrations/Version18000Date20191204114856.php | 1 - core/Migrations/Version19000Date20200211083441.php | 1 - 13 files changed, 2 insertions(+), 15 deletions(-) (limited to 'core/Migrations') diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php index 4df2f4cbdab..7907313f1e3 100644 --- a/core/Migrations/Version13000Date20170718121200.php +++ b/core/Migrations/Version13000Date20170718121200.php @@ -931,5 +931,4 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { } return $schema; } - } diff --git a/core/Migrations/Version13000Date20170926101637.php b/core/Migrations/Version13000Date20170926101637.php index 1dd295e383f..1e42dc9b044 100644 --- a/core/Migrations/Version13000Date20170926101637.php +++ b/core/Migrations/Version13000Date20170926101637.php @@ -59,5 +59,4 @@ class Version13000Date20170926101637 extends BigIntMigration { 'vcategory_to_object' => ['objid', 'categoryid'], ]; } - } diff --git a/core/Migrations/Version14000Date20180518120534.php b/core/Migrations/Version14000Date20180518120534.php index 1e025f88ed1..565a7fab707 100644 --- a/core/Migrations/Version14000Date20180518120534.php +++ b/core/Migrations/Version14000Date20180518120534.php @@ -31,7 +31,6 @@ use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; class Version14000Date20180518120534 extends SimpleMigrationStep { - public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version14000Date20180522074438.php b/core/Migrations/Version14000Date20180522074438.php index 140d220d69a..4afd98d9fbb 100644 --- a/core/Migrations/Version14000Date20180522074438.php +++ b/core/Migrations/Version14000Date20180522074438.php @@ -33,10 +33,8 @@ use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; class Version14000Date20180522074438 extends SimpleMigrationStep { - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ISchemaWrapper { - $schema = $schemaClosure(); if (!$schema->hasTable('twofactor_providers')) { @@ -62,5 +60,4 @@ class Version14000Date20180522074438 extends SimpleMigrationStep { return $schema; } - } diff --git a/core/Migrations/Version14000Date20180626223656.php b/core/Migrations/Version14000Date20180626223656.php index 70f0eaafd36..0e679a9972e 100644 --- a/core/Migrations/Version14000Date20180626223656.php +++ b/core/Migrations/Version14000Date20180626223656.php @@ -31,7 +31,7 @@ class Version14000Date20180626223656 extends SimpleMigrationStep { public function changeSchema(\OCP\Migration\IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); - if(!$schema->hasTable('whats_new')) { + if (!$schema->hasTable('whats_new')) { $table = $schema->createTable('whats_new'); $table->addColumn('id', 'integer', [ 'autoincrement' => true, diff --git a/core/Migrations/Version14000Date20180710092004.php b/core/Migrations/Version14000Date20180710092004.php index 31daa4f9d47..f44dbf42401 100644 --- a/core/Migrations/Version14000Date20180710092004.php +++ b/core/Migrations/Version14000Date20180710092004.php @@ -33,7 +33,6 @@ use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; class Version14000Date20180710092004 extends SimpleMigrationStep { - public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version15000Date20180926101451.php b/core/Migrations/Version15000Date20180926101451.php index fff8b31c6ee..a5f37cc9125 100644 --- a/core/Migrations/Version15000Date20180926101451.php +++ b/core/Migrations/Version15000Date20180926101451.php @@ -51,5 +51,4 @@ class Version15000Date20180926101451 extends SimpleMigrationStep { return $schema; } - } diff --git a/core/Migrations/Version15000Date20181029084625.php b/core/Migrations/Version15000Date20181029084625.php index 0af1b4a6502..607ef054f3a 100644 --- a/core/Migrations/Version15000Date20181029084625.php +++ b/core/Migrations/Version15000Date20181029084625.php @@ -52,5 +52,4 @@ class Version15000Date20181029084625 extends SimpleMigrationStep { return $schema; } - } diff --git a/core/Migrations/Version16000Date20190207141427.php b/core/Migrations/Version16000Date20190207141427.php index 028bd1fcb17..1b5777a9212 100644 --- a/core/Migrations/Version16000Date20190207141427.php +++ b/core/Migrations/Version16000Date20190207141427.php @@ -112,5 +112,4 @@ class Version16000Date20190207141427 extends SimpleMigrationStep { return $schema; } - } diff --git a/core/Migrations/Version17000Date20190514105811.php b/core/Migrations/Version17000Date20190514105811.php index d5d7d63cd77..b435172d5f3 100644 --- a/core/Migrations/Version17000Date20190514105811.php +++ b/core/Migrations/Version17000Date20190514105811.php @@ -45,7 +45,7 @@ class Version17000Date20190514105811 extends SimpleMigrationStep { public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); - if(!$schema->hasTable('filecache_extended')) { + if (!$schema->hasTable('filecache_extended')) { $table = $schema->createTable('filecache_extended'); $table->addColumn('fileid', Type::BIGINT, [ 'notnull' => true, diff --git a/core/Migrations/Version18000Date20191014105105.php b/core/Migrations/Version18000Date20191014105105.php index c36972c556f..62a8e2cc37f 100644 --- a/core/Migrations/Version18000Date20191014105105.php +++ b/core/Migrations/Version18000Date20191014105105.php @@ -90,5 +90,4 @@ class Version18000Date20191014105105 extends SimpleMigrationStep { return $schema; } - } diff --git a/core/Migrations/Version18000Date20191204114856.php b/core/Migrations/Version18000Date20191204114856.php index 256b42f9597..e9bf1221dbf 100644 --- a/core/Migrations/Version18000Date20191204114856.php +++ b/core/Migrations/Version18000Date20191204114856.php @@ -61,5 +61,4 @@ class Version18000Date20191204114856 extends SimpleMigrationStep { return $schema; } - } diff --git a/core/Migrations/Version19000Date20200211083441.php b/core/Migrations/Version19000Date20200211083441.php index 72bb26b02fe..07eb04df14e 100644 --- a/core/Migrations/Version19000Date20200211083441.php +++ b/core/Migrations/Version19000Date20200211083441.php @@ -10,7 +10,6 @@ use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; class Version19000Date20200211083441 extends SimpleMigrationStep { - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); -- cgit v1.2.3