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 --- tests/lib/Files/ObjectStore/LocalTest.php | 1 - tests/lib/Files/ObjectStore/MapperTest.php | 1 - tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php | 1 - tests/lib/Files/ObjectStore/ObjectStoreTest.php | 1 - 4 files changed, 4 deletions(-) (limited to 'tests/lib/Files/ObjectStore') diff --git a/tests/lib/Files/ObjectStore/LocalTest.php b/tests/lib/Files/ObjectStore/LocalTest.php index 99aa23e065d..ceb21428e4b 100644 --- a/tests/lib/Files/ObjectStore/LocalTest.php +++ b/tests/lib/Files/ObjectStore/LocalTest.php @@ -32,5 +32,4 @@ class LocalTest extends ObjectStoreTest { $storage = new Temporary(); return new StorageObjectStore($storage); } - } diff --git a/tests/lib/Files/ObjectStore/MapperTest.php b/tests/lib/Files/ObjectStore/MapperTest.php index 50d3cd553aa..307096d8dbc 100644 --- a/tests/lib/Files/ObjectStore/MapperTest.php +++ b/tests/lib/Files/ObjectStore/MapperTest.php @@ -25,7 +25,6 @@ use OC\Files\ObjectStore\Mapper; use OCP\IUser; class MapperTest extends \Test\TestCase { - public function dataGetBucket() { return [ ['user', 64, '17'], diff --git a/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php b/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php index 25ce5525361..fa8ec535061 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php @@ -56,7 +56,6 @@ class ObjectStoreStorageTest extends Storage { } public function testStat() { - $textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt'; $ctimeStart = time(); $this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile)); diff --git a/tests/lib/Files/ObjectStore/ObjectStoreTest.php b/tests/lib/Files/ObjectStore/ObjectStoreTest.php index 67c41eb7ccc..9300a9bdef6 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreTest.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreTest.php @@ -49,7 +49,6 @@ abstract class ObjectStoreTest extends TestCase { $instance->deleteObject('1'); $this->assertEquals('foobar', stream_get_contents($result)); - } public function testDelete() { -- cgit v1.2.3