diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 15:19:56 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 15:19:56 +0300 |
commit | caff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch) | |
tree | 186d494c2aea5dea7255d3584ef5d595fc6e6194 /apps/sharebymail/tests | |
parent | edf8ce32cffdb920e8171207b342abbd7f1fbe73 (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 'apps/sharebymail/tests')
-rw-r--r-- | apps/sharebymail/tests/SettingsTest.php | 3 | ||||
-rw-r--r-- | apps/sharebymail/tests/ShareByMailProviderTest.php | 10 |
2 files changed, 1 insertions, 12 deletions
diff --git a/apps/sharebymail/tests/SettingsTest.php b/apps/sharebymail/tests/SettingsTest.php index 220f455a26a..83bf12da21e 100644 --- a/apps/sharebymail/tests/SettingsTest.php +++ b/apps/sharebymail/tests/SettingsTest.php @@ -28,7 +28,7 @@ use OCA\ShareByMail\Settings; use OCA\ShareByMail\Settings\SettingsManager; use Test\TestCase; -class SettingsTest extends TestCase { +class SettingsTest extends TestCase { /** @var Settings */ private $instance; @@ -93,5 +93,4 @@ class SettingsTest extends TestCase { $this->instance->announceShareByMailSettings(['array' => &$before]); $this->assertSame($after, $before); } - } diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php index f340fbfa35d..f77b3afefce 100644 --- a/apps/sharebymail/tests/ShareByMailProviderTest.php +++ b/apps/sharebymail/tests/ShareByMailProviderTest.php @@ -139,7 +139,6 @@ class ShareByMailProviderTest extends TestCase { * @return \PHPUnit_Framework_MockObject_MockObject | ShareByMailProvider */ private function getInstance(array $mockedMethods = []) { - $instance = $this->getMockBuilder('OCA\ShareByMail\ShareByMailProvider') ->setConstructorArgs( [ @@ -179,7 +178,6 @@ class ShareByMailProviderTest extends TestCase { $this->hasher, $this->capabilitiesManager ); - } protected function tearDown(): void { @@ -353,7 +351,6 @@ class ShareByMailProviderTest extends TestCase { $this->assertSame(42, $this->invokePrivate($instance, 'createMailShare', [$this->share]) ); - } @@ -383,7 +380,6 @@ class ShareByMailProviderTest extends TestCase { $this->assertSame(42, $this->invokePrivate($instance, 'createMailShare', [$this->share]) ); - } public function testGenerateToken() { @@ -445,11 +441,9 @@ class ShareByMailProviderTest extends TestCase { $this->assertSame($password, $result[0]['password']); $this->assertSame($sendPasswordByTalk, (bool)$result[0]['password_by_talk']); $this->assertSame($hideDownload, (bool)$result[0]['hide_download']); - } public function testUpdate() { - $itemSource = 11; $itemType = 'file'; $shareWith = 'user@server.com'; @@ -603,7 +597,6 @@ class ShareByMailProviderTest extends TestCase { } public function testGetShareByPath() { - $itemSource = 11; $itemType = 'file'; $shareWith = 'user@server.com'; @@ -639,7 +632,6 @@ class ShareByMailProviderTest extends TestCase { } public function testGetShareByToken() { - $itemSource = 11; $itemType = 'file'; $shareWith = 'user@server.com'; @@ -726,7 +718,6 @@ class ShareByMailProviderTest extends TestCase { } public function testUserDeleted() { - $itemSource = 11; $itemType = 'file'; $shareWith = 'user@server.com'; @@ -757,7 +748,6 @@ class ShareByMailProviderTest extends TestCase { $this->assertTrue(is_array($after)); $this->assertSame(1, count($after)); $this->assertSame($id, (int)$after[0]['id']); - } public function testGetRawShare() { |