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/theming/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/theming/tests')
-rw-r--r-- | apps/theming/tests/CapabilitiesTest.php | 4 | ||||
-rw-r--r-- | apps/theming/tests/Controller/IconControllerTest.php | 1 | ||||
-rw-r--r-- | apps/theming/tests/Controller/ThemingControllerTest.php | 5 | ||||
-rw-r--r-- | apps/theming/tests/IconBuilderTest.php | 2 | ||||
-rw-r--r-- | apps/theming/tests/ImageManagerTest.php | 4 | ||||
-rw-r--r-- | apps/theming/tests/ServicesTest.php | 2 | ||||
-rw-r--r-- | apps/theming/tests/ThemingDefaultsTest.php | 1 | ||||
-rw-r--r-- | apps/theming/tests/UtilTest.php | 3 |
8 files changed, 8 insertions, 14 deletions
diff --git a/apps/theming/tests/CapabilitiesTest.php b/apps/theming/tests/CapabilitiesTest.php index 1f871d101d8..6364f953c57 100644 --- a/apps/theming/tests/CapabilitiesTest.php +++ b/apps/theming/tests/CapabilitiesTest.php @@ -42,7 +42,7 @@ use Test\TestCase; * * @package OCA\Theming\Tests */ -class CapabilitiesTest extends TestCase { +class CapabilitiesTest extends TestCase { /** @var ThemingDefaults|\PHPUnit_Framework_MockObject_MockObject */ protected $theming; @@ -175,7 +175,7 @@ class CapabilitiesTest extends TestCase { ->method('isBackgroundThemed') ->willReturn($backgroundThemed); - if($background !== 'backgroundColor') { + if ($background !== 'backgroundColor') { $this->theming->expects($this->once()) ->method('getBackground') ->willReturn($background); diff --git a/apps/theming/tests/Controller/IconControllerTest.php b/apps/theming/tests/Controller/IconControllerTest.php index 59608f41a68..05b74c58e79 100644 --- a/apps/theming/tests/Controller/IconControllerTest.php +++ b/apps/theming/tests/Controller/IconControllerTest.php @@ -205,5 +205,4 @@ class IconControllerTest extends TestCase { $expected->cacheFor(86400); $this->assertEquals($expected, $this->iconController->getTouchIcon()); } - } diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php index d1890f7df5c..b9c291c9578 100644 --- a/apps/theming/tests/Controller/ThemingControllerTest.php +++ b/apps/theming/tests/Controller/ThemingControllerTest.php @@ -401,7 +401,7 @@ class ThemingControllerTest extends TestCase { $file = $this->createMock(ISimpleFile::class); $folder = $this->createMock(ISimpleFolder::class); - if($folderExists) { + if ($folderExists) { $this->appData ->expects($this->once()) ->method('getFolder') @@ -476,7 +476,7 @@ class ThemingControllerTest extends TestCase { $file = $this->createMock(ISimpleFile::class); $folder = $this->createMock(ISimpleFolder::class); - if($folderExists) { + if ($folderExists) { $this->appData ->expects($this->once()) ->method('getFolder') @@ -963,5 +963,4 @@ class ThemingControllerTest extends TestCase { $response->cacheFor(3600); $this->assertEquals($response, $this->themingController->getManifest('core')); } - } diff --git a/apps/theming/tests/IconBuilderTest.php b/apps/theming/tests/IconBuilderTest.php index 1a05235e2dc..4d1a0daf3b1 100644 --- a/apps/theming/tests/IconBuilderTest.php +++ b/apps/theming/tests/IconBuilderTest.php @@ -68,7 +68,7 @@ class IconBuilderTest extends TestCase { } private function checkImagick() { - if(!extension_loaded('imagick')) { + if (!extension_loaded('imagick')) { $this->markTestSkipped('Imagemagick is required for dynamic icon generation.'); } $checkImagick = new \Imagick(); diff --git a/apps/theming/tests/ImageManagerTest.php b/apps/theming/tests/ImageManagerTest.php index 19896be21a2..4098c466da7 100644 --- a/apps/theming/tests/ImageManagerTest.php +++ b/apps/theming/tests/ImageManagerTest.php @@ -69,7 +69,7 @@ class ImageManagerTest extends TestCase { } private function checkImagick() { - if(!extension_loaded('imagick')) { + if (!extension_loaded('imagick')) { $this->markTestSkipped('Imagemagick is required for dynamic icon generation.'); } $checkImagick = new \Imagick(); @@ -172,7 +172,6 @@ class ImageManagerTest extends TestCase { ->method('getAbsoluteUrl') ->willReturn('url-to-image-absolute?v=0'); $this->assertEquals('url-to-image-absolute?v=0', $this->imageManager->getImageUrlAbsolute('logo', false)); - } public function testGetImage() { @@ -326,5 +325,4 @@ class ImageManagerTest extends TestCase { ->willReturn($folders[2]); $this->imageManager->cleanup(); } - } diff --git a/apps/theming/tests/ServicesTest.php b/apps/theming/tests/ServicesTest.php index 62618abcd96..d530d321aeb 100644 --- a/apps/theming/tests/ServicesTest.php +++ b/apps/theming/tests/ServicesTest.php @@ -43,7 +43,7 @@ use Test\TestCase; * @group DB * @package OCA\Theming\Tests */ -class ServicesTest extends TestCase { +class ServicesTest extends TestCase { /** @var \OCA\Activity\AppInfo\Application */ protected $app; diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php index a06cdb8f7a8..e5b6fb72db0 100644 --- a/apps/theming/tests/ThemingDefaultsTest.php +++ b/apps/theming/tests/ThemingDefaultsTest.php @@ -777,5 +777,4 @@ class ThemingDefaultsTest extends TestCase { ->willReturn('themingRoute'); $this->assertEquals($result, $this->template->replaceImagePath($app, $image)); } - } diff --git a/apps/theming/tests/UtilTest.php b/apps/theming/tests/UtilTest.php index 969d35f7d27..51cb76f9559 100644 --- a/apps/theming/tests/UtilTest.php +++ b/apps/theming/tests/UtilTest.php @@ -165,7 +165,7 @@ class UtilTest extends TestCase { * @dataProvider dataGetAppImage */ public function testGetAppImage($app, $image, $expected) { - if($app !== 'core') { + if ($app !== 'core') { $this->appManager->expects($this->once()) ->method('getAppPath') ->with($app) @@ -238,5 +238,4 @@ class UtilTest extends TestCase { ->willReturn($folder); $this->assertEquals($expected, $this->util->isBackgroundThemed()); } - } |