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

github.com/nextcloud/tasks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaimund Schlüßler <raimund.schluessler@mailbox.org>2020-04-15 10:40:32 +0300
committerGitHub <noreply@github.com>2020-04-15 10:40:32 +0300
commitc463ced7b4e5eb1c77d45533088041ba53f84f23 (patch)
tree103f150b95a041f8ce7df7d818b6d9813963037c
parent9645c14ad02e1a563701e2b386273168628e8356 (diff)
parent007721b2eb68113694fea7ea6f747e9e0285154e (diff)
Merge pull request #960 from nextcloud/dependencies/coding-standard
Bump nextcloud/coding-standard form 0.2.0 to 0.3.0
-rw-r--r--composer.json2
-rw-r--r--composer.lock187
-rw-r--r--lib/Controller/Response.php5
-rw-r--r--lib/Service/CollectionsService.php4
-rw-r--r--tests/php/integration/AppInfo/ApplicationTest.php2
-rw-r--r--tests/php/unit/Controller/CollectionsControllerTest.php1
-rw-r--r--tests/php/unit/Controller/PageControllerTest.php1
-rw-r--r--tests/php/unit/Controller/SettingsControllerTest.php1
-rw-r--r--tests/php/unit/Service/CollectionsServiceTest.php1
-rw-r--r--tests/php/unit/Service/SettingsServiceTest.php1
10 files changed, 18 insertions, 187 deletions
diff --git a/composer.json b/composer.json
index e318c2e0..5afd0f77 100644
--- a/composer.json
+++ b/composer.json
@@ -11,7 +11,7 @@
],
"require": {},
"require-dev": {
- "nextcloud/coding-standard": "^0.2.0",
+ "nextcloud/coding-standard": "^0.3.0",
"phpunit/phpunit": "^7.5"
},
"config": {
diff --git a/composer.lock b/composer.lock
index 5b6e2744..b94118f6 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "827bb6e345ef961675b6fdac03e048fa",
+ "content-hash": "634a2fb11ad36eaedf3d4dcb98f6469e",
"packages": [],
"packages-dev": [
{
@@ -110,12 +110,6 @@
"Xdebug",
"performance"
],
- "funding": [
- {
- "url": "https://packagist.com",
- "type": "custom"
- }
- ],
"time": "2020-03-01T12:26:26+00:00"
},
{
@@ -307,16 +301,16 @@
},
{
"name": "friendsofphp/php-cs-fixer",
- "version": "v2.16.1",
+ "version": "v2.16.2",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
- "reference": "c8afb599858876e95e8ebfcd97812d383fa23f02"
+ "reference": "c460a3cbaa58f983fe026cd52c45950bf61e9239"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/c8afb599858876e95e8ebfcd97812d383fa23f02",
- "reference": "c8afb599858876e95e8ebfcd97812d383fa23f02",
+ "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/c460a3cbaa58f983fe026cd52c45950bf61e9239",
+ "reference": "c460a3cbaa58f983fe026cd52c45950bf61e9239",
"shasum": ""
},
"require": {
@@ -352,6 +346,7 @@
"symfony/yaml": "^3.0 || ^4.0 || ^5.0"
},
"suggest": {
+ "ext-dom": "For handling output formats in XML",
"ext-mbstring": "For handling non-UTF8 characters in cache signature.",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.",
@@ -374,6 +369,7 @@
"tests/Test/IntegrationCaseFactory.php",
"tests/Test/IntegrationCaseFactoryInterface.php",
"tests/Test/InternalIntegrationCaseFactory.php",
+ "tests/Test/IsIdenticalConstraint.php",
"tests/TestCase.php"
]
},
@@ -392,7 +388,7 @@
}
],
"description": "A tool to automatically fix PHP code style",
- "time": "2019-11-25T22:10:32+00:00"
+ "time": "2020-04-10T21:08:06+00:00"
},
{
"name": "myclabs/deep-copy",
@@ -444,16 +440,16 @@
},
{
"name": "nextcloud/coding-standard",
- "version": "v0.2.0",
+ "version": "v0.3.0",
"source": {
"type": "git",
"url": "https://github.com/nextcloud/coding-standard.git",
- "reference": "e1941fe38c6bbfe180883827f76806b318890e5a"
+ "reference": "4f5cd012760f8293e19e602651a0ecaa265e4db9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/e1941fe38c6bbfe180883827f76806b318890e5a",
- "reference": "e1941fe38c6bbfe180883827f76806b318890e5a",
+ "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/4f5cd012760f8293e19e602651a0ecaa265e4db9",
+ "reference": "4f5cd012760f8293e19e602651a0ecaa265e4db9",
"shasum": ""
},
"require": {
@@ -477,7 +473,7 @@
}
],
"description": "Nextcloud coding standards for the php cs fixer",
- "time": "2020-04-09T14:37:41+00:00"
+ "time": "2020-04-10T14:57:18+00:00"
},
{
"name": "paragonie/random_compat",
@@ -2009,20 +2005,6 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-03-30T11:42:42+00:00"
},
{
@@ -2093,20 +2075,6 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-03-27T16:56:45+00:00"
},
{
@@ -2215,20 +2183,6 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-03-27T16:56:45+00:00"
},
{
@@ -2278,20 +2232,6 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-03-27T16:56:45+00:00"
},
{
@@ -2346,20 +2286,6 @@
"configuration",
"options"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-03-27T16:56:45+00:00"
},
{
@@ -2418,20 +2344,6 @@
"polyfill",
"portable"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-02-27T09:26:54+00:00"
},
{
@@ -2491,20 +2403,6 @@
"portable",
"shim"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-03-09T19:04:49+00:00"
},
{
@@ -2619,20 +2517,6 @@
"portable",
"shim"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-02-27T09:26:54+00:00"
},
{
@@ -2691,20 +2575,6 @@
"portable",
"shim"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-02-27T09:26:54+00:00"
},
{
@@ -2754,20 +2624,6 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-03-27T16:56:45+00:00"
},
{
@@ -2876,20 +2732,6 @@
],
"description": "Symfony Stopwatch Component",
"homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-03-27T16:56:45+00:00"
},
{
@@ -2987,6 +2829,5 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
- "platform-dev": [],
- "plugin-api-version": "1.1.0"
+ "platform-dev": []
}
diff --git a/lib/Controller/Response.php b/lib/Controller/Response.php
index 9dac6506..5790a6fd 100644
--- a/lib/Controller/Response.php
+++ b/lib/Controller/Response.php
@@ -26,7 +26,6 @@ use \Closure;
use \OCP\AppFramework\Http\JSONResponse;
trait Response {
-
protected function generateResponse(Closure $callback) {
try {
$message = [
@@ -34,8 +33,7 @@ trait Response {
'data' => $callback(),
'message' => null
];
-
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$message = [
'status' => 'error',
'data' => null,
@@ -44,5 +42,4 @@ trait Response {
}
return new JSONResponse($message);
}
-
}
diff --git a/lib/Service/CollectionsService.php b/lib/Service/CollectionsService.php
index c8a91053..5b7d266c 100644
--- a/lib/Service/CollectionsService.php
+++ b/lib/Service/CollectionsService.php
@@ -98,7 +98,7 @@ class CollectionsService {
'show' => 2,
'icon' => 'sprt-checkmark']
];
- foreach ($collections as $key => $collection){
+ foreach ($collections as $key => $collection) {
$tmp = $this->settings->getUserValue($this->userId, $this->appName,'show_'.$collection['id']);
if (!in_array($tmp, ['0','1','2'])) {
$this->settings->setUserValue($this->userId, $this->appName,'show_'.$collection['id'],$collections[$key]['show']);
@@ -117,7 +117,7 @@ class CollectionsService {
* @return bool
*/
public function setVisibility(string $collectionID, int $visibility):bool {
- if (in_array($visibility, [0,1,2])){
+ if (in_array($visibility, [0,1,2])) {
$this->settings->setUserValue($this->userId, $this->appName,'show_'.$collectionID,$visibility);
}
return true;
diff --git a/tests/php/integration/AppInfo/ApplicationTest.php b/tests/php/integration/AppInfo/ApplicationTest.php
index a78fb33b..8399abd2 100644
--- a/tests/php/integration/AppInfo/ApplicationTest.php
+++ b/tests/php/integration/AppInfo/ApplicationTest.php
@@ -26,7 +26,6 @@
use PHPUnit\Framework\TestCase;
class AppTest extends TestCase {
-
private $container;
private $app;
@@ -47,5 +46,4 @@ class AppTest extends TestCase {
$enabled = array_key_exists('tasks', $navigationManager->getAll());
$this->assertTrue($enabled);
}
-
}
diff --git a/tests/php/unit/Controller/CollectionsControllerTest.php b/tests/php/unit/Controller/CollectionsControllerTest.php
index bfcdde70..61f8a8d6 100644
--- a/tests/php/unit/Controller/CollectionsControllerTest.php
+++ b/tests/php/unit/Controller/CollectionsControllerTest.php
@@ -29,7 +29,6 @@ use OCP\IRequest;
use PHPUnit\Framework\TestCase;
class CollectionsControllerTest extends TestCase {
-
private $appName;
private $collectionsService;
private $request;
diff --git a/tests/php/unit/Controller/PageControllerTest.php b/tests/php/unit/Controller/PageControllerTest.php
index a6dba9fe..3f61de9a 100644
--- a/tests/php/unit/Controller/PageControllerTest.php
+++ b/tests/php/unit/Controller/PageControllerTest.php
@@ -15,7 +15,6 @@ use OCP\AppFramework\Http\TemplateResponse;
use PHPUnit\Framework\TestCase as Base;
class PageControllerTest extends Base {
-
private $controller;
public function setUp(): void {
diff --git a/tests/php/unit/Controller/SettingsControllerTest.php b/tests/php/unit/Controller/SettingsControllerTest.php
index 7e9c99c8..26d19548 100644
--- a/tests/php/unit/Controller/SettingsControllerTest.php
+++ b/tests/php/unit/Controller/SettingsControllerTest.php
@@ -29,7 +29,6 @@ use OCP\IRequest;
use PHPUnit\Framework\TestCase;
class SettingsControllerTest extends TestCase {
-
private $appName;
private $settingsService;
private $request;
diff --git a/tests/php/unit/Service/CollectionsServiceTest.php b/tests/php/unit/Service/CollectionsServiceTest.php
index eef7ef6c..2a58d6c6 100644
--- a/tests/php/unit/Service/CollectionsServiceTest.php
+++ b/tests/php/unit/Service/CollectionsServiceTest.php
@@ -29,7 +29,6 @@ use OCP\IL10N;
use PHPUnit\Framework\TestCase;
class CollectionsServiceTest extends TestCase {
-
private $collectionsService;
private $settings;
private $userId;
diff --git a/tests/php/unit/Service/SettingsServiceTest.php b/tests/php/unit/Service/SettingsServiceTest.php
index 36ffa5f6..36a73a7f 100644
--- a/tests/php/unit/Service/SettingsServiceTest.php
+++ b/tests/php/unit/Service/SettingsServiceTest.php
@@ -28,7 +28,6 @@ use OCP\IConfig;
use PHPUnit\Framework\TestCase;
class SettingsServiceTest extends TestCase {
-
private $settingsService;
private $settings;
private $userId;