aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework/Controller
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/AppFramework/Controller
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/AppFramework/Controller')
-rw-r--r--tests/lib/AppFramework/Controller/ApiControllerTest.php4
-rw-r--r--tests/lib/AppFramework/Controller/ControllerTest.php3
-rw-r--r--tests/lib/AppFramework/Controller/OCSControllerTest.php3
-rw-r--r--tests/lib/AppFramework/Controller/PublicShareControllerTest.php1
4 files changed, 4 insertions, 7 deletions
diff --git a/tests/lib/AppFramework/Controller/ApiControllerTest.php b/tests/lib/AppFramework/Controller/ApiControllerTest.php
index ccc44b97764..71eb97b94da 100644
--- a/tests/lib/AppFramework/Controller/ApiControllerTest.php
+++ b/tests/lib/AppFramework/Controller/ApiControllerTest.php
@@ -27,7 +27,8 @@ use OC\AppFramework\Http\Request;
use OCP\AppFramework\ApiController;
use OCP\IConfig;
-class ChildApiController extends ApiController {};
+class ChildApiController extends ApiController {
+};
class ApiControllerTest extends \Test\TestCase {
@@ -57,5 +58,4 @@ class ApiControllerTest extends \Test\TestCase {
$this->assertEquals('false', $headers['Access-Control-Allow-Credentials']);
$this->assertEquals(100, $headers['Access-Control-Max-Age']);
}
-
}
diff --git a/tests/lib/AppFramework/Controller/ControllerTest.php b/tests/lib/AppFramework/Controller/ControllerTest.php
index f15d178df28..e07089e0c82 100644
--- a/tests/lib/AppFramework/Controller/ControllerTest.php
+++ b/tests/lib/AppFramework/Controller/ControllerTest.php
@@ -30,7 +30,6 @@ use OCP\AppFramework\Http\JSONResponse;
use OCP\IConfig;
class ChildController extends Controller {
-
public function __construct($appName, $request) {
parent::__construct($appName, $request);
$this->registerResponder('tom', function ($respone) {
@@ -157,6 +156,4 @@ class ControllerTest extends \Test\TestCase {
$this->assertEquals('tom', $responder);
}
-
-
}
diff --git a/tests/lib/AppFramework/Controller/OCSControllerTest.php b/tests/lib/AppFramework/Controller/OCSControllerTest.php
index 85f2a7f6463..91a61047871 100644
--- a/tests/lib/AppFramework/Controller/OCSControllerTest.php
+++ b/tests/lib/AppFramework/Controller/OCSControllerTest.php
@@ -30,7 +30,8 @@ use OCP\AppFramework\OCSController;
use OCP\IConfig;
use OCP\Security\ISecureRandom;
-class ChildOCSController extends OCSController {}
+class ChildOCSController extends OCSController {
+}
class OCSControllerTest extends \Test\TestCase {
diff --git a/tests/lib/AppFramework/Controller/PublicShareControllerTest.php b/tests/lib/AppFramework/Controller/PublicShareControllerTest.php
index 388d5fbeef2..521c45e47c6 100644
--- a/tests/lib/AppFramework/Controller/PublicShareControllerTest.php
+++ b/tests/lib/AppFramework/Controller/PublicShareControllerTest.php
@@ -89,5 +89,4 @@ class PublicShareControllerTest extends \Test\TestCase {
$this->assertEquals($expected, $this->controller->isAuthenticated());
}
-
}