aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Template
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
commitcaff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch)
tree186d494c2aea5dea7255d3584ef5d595fc6e6194 /tests/lib/Template
parentedf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff)
downloadnextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.tar.gz
nextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.zip
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 'tests/lib/Template')
-rw-r--r--tests/lib/Template/CSSResourceLocatorTest.php4
-rw-r--r--tests/lib/Template/IconsCacherTest.php3
-rw-r--r--tests/lib/Template/JSCombinerTest.php2
-rw-r--r--tests/lib/Template/SCSSCacherTest.php4
4 files changed, 4 insertions, 9 deletions
diff --git a/tests/lib/Template/CSSResourceLocatorTest.php b/tests/lib/Template/CSSResourceLocatorTest.php
index 8c1eb66d303..01f2285670e 100644
--- a/tests/lib/Template/CSSResourceLocatorTest.php
+++ b/tests/lib/Template/CSSResourceLocatorTest.php
@@ -69,8 +69,8 @@ class CSSResourceLocatorTest extends \Test\TestCase {
private function cssResourceLocator() {
/** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */
- $factory = $this->createMock(Factory::class);
- $factory->method('get')->with('css')->willReturn($this->appData);
+ $factory = $this->createMock(Factory::class);
+ $factory->method('get')->with('css')->willReturn($this->appData);
$scssCacher = new SCSSCacher(
$this->logger,
$factory,
diff --git a/tests/lib/Template/IconsCacherTest.php b/tests/lib/Template/IconsCacherTest.php
index eacb5c812bc..4b5c6a73ef8 100644
--- a/tests/lib/Template/IconsCacherTest.php
+++ b/tests/lib/Template/IconsCacherTest.php
@@ -1,6 +1,6 @@
<?php
-declare (strict_types = 1);
+declare(strict_types = 1);
/**
* @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv@protonmail.com)
*
@@ -148,5 +148,4 @@ class IconsCacherTest extends \Test\TestCase {
$actual = $this->iconsCacher->setIconsCss($actual);
$this->assertEquals($expected, $actual);
}
-
}
diff --git a/tests/lib/Template/JSCombinerTest.php b/tests/lib/Template/JSCombinerTest.php
index abafc583ccf..0cdea95fd6f 100644
--- a/tests/lib/Template/JSCombinerTest.php
+++ b/tests/lib/Template/JSCombinerTest.php
@@ -70,7 +70,6 @@ class JSCombinerTest extends \Test\TestCase {
$this->config,
$this->logger
);
-
}
public function testProcessDebugMode() {
@@ -560,5 +559,4 @@ var b = \'world\';
$this->jsCombiner->resetCache();
}
-
}
diff --git a/tests/lib/Template/SCSSCacherTest.php b/tests/lib/Template/SCSSCacherTest.php
index 09ab9363d95..9dfd8d20fea 100644
--- a/tests/lib/Template/SCSSCacherTest.php
+++ b/tests/lib/Template/SCSSCacherTest.php
@@ -167,7 +167,7 @@ class SCSSCacherTest extends \Test\TestCase {
throw new NotFoundException();
} elseif ($path === $filePrefix.'styles.css.gzip') {
return $gzfile;
- }else {
+ } else {
$this->fail();
}
});
@@ -539,6 +539,4 @@ class SCSSCacherTest extends \Test\TestCase {
$this->scssCacher->resetCache();
}
-
-
}