Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 15:19:56 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 15:19:56 +0300
commitcaff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch)
tree186d494c2aea5dea7255d3584ef5d595fc6e6194 /tests/lib/NaturalSortTest.php
parentedf8ce32cffdb920e8171207b342abbd7f1fbe73 (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 'tests/lib/NaturalSortTest.php')
-rw-r--r--tests/lib/NaturalSortTest.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/lib/NaturalSortTest.php b/tests/lib/NaturalSortTest.php
index 30e439655d7..f8e7f31a285 100644
--- a/tests/lib/NaturalSortTest.php
+++ b/tests/lib/NaturalSortTest.php
@@ -13,9 +13,8 @@ class NaturalSortTest extends \Test\TestCase {
/**
* @dataProvider naturalSortDataProvider
*/
- public function testNaturalSortCompare($array, $sorted)
- {
- if(!class_exists('Collator')) {
+ public function testNaturalSortCompare($array, $sorted) {
+ if (!class_exists('Collator')) {
$this->markTestSkipped('The intl module is not available, natural sorting might not work as expected.');
return;
}
@@ -27,8 +26,7 @@ class NaturalSortTest extends \Test\TestCase {
/**
* @dataProvider defaultCollatorDataProvider
*/
- public function testDefaultCollatorCompare($array, $sorted)
- {
+ public function testDefaultCollatorCompare($array, $sorted) {
$comparator = new \OC\NaturalSort(new \OC\NaturalSort_DefaultCollator());
usort($array, [$comparator, 'compare']);
$this->assertEquals($sorted, $array);
@@ -39,8 +37,7 @@ class NaturalSortTest extends \Test\TestCase {
* Must provide the same result as in core/js/tests/specs/coreSpec.js
* @return array test cases
*/
- public function naturalSortDataProvider()
- {
+ public function naturalSortDataProvider() {
return [
// different casing
[
@@ -194,8 +191,7 @@ class NaturalSortTest extends \Test\TestCase {
* Must provide the same result as in core/js/tests/specs/coreSpec.js
* @return array test cases
*/
- public function defaultCollatorDataProvider()
- {
+ public function defaultCollatorDataProvider() {
return [
// different casing
[