Update php-cs-fixer configuration

Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
This commit is contained in:
Raimund Schlüßler 2022-10-18 21:47:27 +02:00
Родитель 260b435cd3
Коммит a539aef345
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 036FA7EB1A599178
11 изменённых файлов: 147 добавлений и 295 удалений

Просмотреть файл

Просмотреть файл

@ -13,7 +13,7 @@
"php": ">=7.3 <=8.1"
},
"require-dev": {
"nextcloud/coding-standard": "^0.3.0",
"nextcloud/coding-standard": "^1.0.0",
"phpunit/phpunit": "^9.5"
},
"config": {

423
composer.lock сгенерированный
Просмотреть файл

@ -4,35 +4,35 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "127deb902582b565caffd9d3dc730829",
"content-hash": "4cc06386090f15b73a03b6533a1fcf07",
"packages": [],
"packages-dev": [
{
"name": "composer/pcre",
"version": "1.0.1",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/composer/pcre.git",
"reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560"
"reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560",
"reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560",
"url": "https://api.github.com/repos/composer/pcre/zipball/e300eb6c535192decd27a85bc72a9290f0d6b3bd",
"reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
"php": "^7.4 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "^1.3",
"phpstan/phpstan-strict-rules": "^1.1",
"symfony/phpunit-bridge": "^4.2 || ^5"
"symfony/phpunit-bridge": "^5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.x-dev"
"dev-main": "3.x-dev"
}
},
"autoload": {
@ -60,7 +60,7 @@
],
"support": {
"issues": "https://github.com/composer/pcre/issues",
"source": "https://github.com/composer/pcre/tree/1.0.1"
"source": "https://github.com/composer/pcre/tree/3.0.0"
},
"funding": [
{
@ -76,7 +76,7 @@
"type": "tidelift"
}
],
"time": "2022-01-21T20:24:37+00:00"
"time": "2022-02-25T20:21:48+00:00"
},
{
"name": "composer/semver",
@ -161,27 +161,27 @@
},
{
"name": "composer/xdebug-handler",
"version": "2.0.5",
"version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
"reference": "9e36aeed4616366d2b690bdce11f71e9178c579a"
"reference": "ced299686f41dce890debac69273b47ffe98a40c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a",
"reference": "9e36aeed4616366d2b690bdce11f71e9178c579a",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c",
"reference": "ced299686f41dce890debac69273b47ffe98a40c",
"shasum": ""
},
"require": {
"composer/pcre": "^1",
"php": "^5.3.2 || ^7.0 || ^8.0",
"composer/pcre": "^1 || ^2 || ^3",
"php": "^7.2.5 || ^8.0",
"psr/log": "^1 || ^2 || ^3"
},
"require-dev": {
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-strict-rules": "^1.1",
"symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0"
"symfony/phpunit-bridge": "^6.0"
},
"type": "library",
"autoload": {
@ -207,7 +207,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/xdebug-handler/issues",
"source": "https://github.com/composer/xdebug-handler/tree/2.0.5"
"source": "https://github.com/composer/xdebug-handler/tree/3.0.3"
},
"funding": [
{
@ -223,7 +223,7 @@
"type": "tidelift"
}
],
"time": "2022-02-24T20:20:32+00:00"
"time": "2022-02-25T21:32:43+00:00"
},
{
"name": "doctrine/annotations",
@ -446,85 +446,65 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v2.19.3",
"version": "v3.12.0",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
"reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8"
"reference": "eae11d945e2885d86e1c080eec1bb30a2aa27998"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/75ac86f33fab4714ea5a39a396784d83ae3b5ed8",
"reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8",
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/eae11d945e2885d86e1c080eec1bb30a2aa27998",
"reference": "eae11d945e2885d86e1c080eec1bb30a2aa27998",
"shasum": ""
},
"require": {
"composer/semver": "^1.4 || ^2.0 || ^3.0",
"composer/xdebug-handler": "^1.2 || ^2.0",
"doctrine/annotations": "^1.2",
"composer/semver": "^3.2",
"composer/xdebug-handler": "^3.0.3",
"doctrine/annotations": "^1.13",
"ext-json": "*",
"ext-tokenizer": "*",
"php": "^5.6 || ^7.0 || ^8.0",
"php-cs-fixer/diff": "^1.3",
"symfony/console": "^3.4.43 || ^4.1.6 || ^5.0",
"symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0",
"symfony/filesystem": "^3.0 || ^4.0 || ^5.0",
"symfony/finder": "^3.0 || ^4.0 || ^5.0",
"symfony/options-resolver": "^3.0 || ^4.0 || ^5.0",
"symfony/polyfill-php70": "^1.0",
"symfony/polyfill-php72": "^1.4",
"symfony/process": "^3.0 || ^4.0 || ^5.0",
"symfony/stopwatch": "^3.0 || ^4.0 || ^5.0"
"php": "^7.4 || ^8.0",
"sebastian/diff": "^4.0",
"symfony/console": "^5.4 || ^6.0",
"symfony/event-dispatcher": "^5.4 || ^6.0",
"symfony/filesystem": "^5.4 || ^6.0",
"symfony/finder": "^5.4 || ^6.0",
"symfony/options-resolver": "^5.4 || ^6.0",
"symfony/polyfill-mbstring": "^1.23",
"symfony/polyfill-php80": "^1.25",
"symfony/polyfill-php81": "^1.25",
"symfony/process": "^5.4 || ^6.0",
"symfony/stopwatch": "^5.4 || ^6.0"
},
"require-dev": {
"justinrainbow/json-schema": "^5.0",
"keradus/cli-executor": "^1.4",
"mikey179/vfsstream": "^1.6",
"php-coveralls/php-coveralls": "^2.4.2",
"php-cs-fixer/accessible-object": "^1.0",
"justinrainbow/json-schema": "^5.2",
"keradus/cli-executor": "^1.5",
"mikey179/vfsstream": "^1.6.10",
"php-coveralls/php-coveralls": "^2.5.2",
"php-cs-fixer/accessible-object": "^1.1",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
"phpspec/prophecy-phpunit": "^1.1 || ^2.0",
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5",
"phpunitgoodpractices/polyfill": "^1.5",
"phpunitgoodpractices/traits": "^1.9.1",
"sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1",
"symfony/phpunit-bridge": "^5.2.1",
"symfony/yaml": "^3.0 || ^4.0 || ^5.0"
"phpspec/prophecy": "^1.15",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.5",
"phpunitgoodpractices/polyfill": "^1.6",
"phpunitgoodpractices/traits": "^1.9.2",
"symfony/phpunit-bridge": "^6.0",
"symfony/yaml": "^5.4 || ^6.0"
},
"suggest": {
"ext-dom": "For handling output formats in XML",
"ext-mbstring": "For handling non-UTF8 characters.",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.",
"symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
"ext-mbstring": "For handling non-UTF8 characters."
},
"bin": [
"php-cs-fixer"
],
"type": "application",
"extra": {
"branch-alias": {
"dev-master": "2.19-dev"
}
},
"autoload": {
"psr-4": {
"PhpCsFixer\\": "src/"
},
"classmap": [
"tests/Test/AbstractFixerTestCase.php",
"tests/Test/AbstractIntegrationCaseFactory.php",
"tests/Test/AbstractIntegrationTestCase.php",
"tests/Test/Assert/AssertTokensTrait.php",
"tests/Test/IntegrationCase.php",
"tests/Test/IntegrationCaseFactory.php",
"tests/Test/IntegrationCaseFactoryInterface.php",
"tests/Test/InternalIntegrationCaseFactory.php",
"tests/Test/IsIdenticalConstraint.php",
"tests/Test/TokensWithObservedTransformers.php",
"tests/TestCase.php"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@ -543,7 +523,7 @@
"description": "A tool to automatically fix PHP code style",
"support": {
"issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues",
"source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.19.3"
"source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.12.0"
},
"funding": [
{
@ -551,7 +531,7 @@
"type": "github"
}
],
"time": "2021-11-15T17:17:55+00:00"
"time": "2022-10-12T14:20:51+00:00"
},
{
"name": "myclabs/deep-copy",
@ -614,21 +594,21 @@
},
{
"name": "nextcloud/coding-standard",
"version": "v0.3.0",
"version": "v1.0.0",
"source": {
"type": "git",
"url": "https://github.com/nextcloud/coding-standard.git",
"reference": "4f5cd012760f8293e19e602651a0ecaa265e4db9"
"reference": "f3d1f9375e89c605deb1734f59a9f51ecbe80578"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/4f5cd012760f8293e19e602651a0ecaa265e4db9",
"reference": "4f5cd012760f8293e19e602651a0ecaa265e4db9",
"url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/f3d1f9375e89c605deb1734f59a9f51ecbe80578",
"reference": "f3d1f9375e89c605deb1734f59a9f51ecbe80578",
"shasum": ""
},
"require": {
"friendsofphp/php-cs-fixer": "^2.16",
"php": "^7.2"
"friendsofphp/php-cs-fixer": "^3.2",
"php": "^7.3|^8.0"
},
"type": "library",
"autoload": {
@ -649,9 +629,9 @@
"description": "Nextcloud coding standards for the php cs fixer",
"support": {
"issues": "https://github.com/nextcloud/coding-standard/issues",
"source": "https://github.com/nextcloud/coding-standard/tree/v0.3.0"
"source": "https://github.com/nextcloud/coding-standard/tree/v1.0.0"
},
"time": "2020-04-10T14:57:18+00:00"
"time": "2021-11-10T08:44:10+00:00"
},
{
"name": "nikic/php-parser",
@ -820,62 +800,6 @@
},
"time": "2022-02-21T01:04:05+00:00"
},
{
"name": "php-cs-fixer/diff",
"version": "v1.3.1",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/diff.git",
"reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759",
"reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759",
"shasum": ""
},
"require": {
"php": "^5.6 || ^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0",
"symfony/process": "^3.3"
},
"type": "library",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Kore Nordmann",
"email": "mail@kore-nordmann.de"
},
{
"name": "SpacePossum"
}
],
"description": "sebastian/diff v2 backport support for PHP5.6",
"homepage": "https://github.com/PHP-CS-Fixer",
"keywords": [
"diff"
],
"support": {
"issues": "https://github.com/PHP-CS-Fixer/diff/issues",
"source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1"
},
"abandoned": true,
"time": "2020-10-14T08:39:05+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.17",
@ -3313,150 +3237,6 @@
],
"time": "2022-05-24T11:49:31+00:00"
},
{
"name": "symfony/polyfill-php70",
"version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php70.git",
"reference": "5f03a781d984aae42cebd18e7912fa80f02ee644"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644",
"reference": "5f03a781d984aae42cebd18e7912fa80f02ee644",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "metapackage",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0"
},
"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-10-23T14:02:19+00:00"
},
{
"name": "symfony/polyfill-php72",
"version": "v1.26.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2",
"reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php72\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0"
},
"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": "2022-05-24T11:49:31+00:00"
},
{
"name": "symfony/polyfill-php73",
"version": "v1.26.0",
@ -3619,6 +3399,85 @@
],
"time": "2022-05-10T07:21:04+00:00"
},
{
"name": "symfony/polyfill-php81",
"version": "v1.26.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php81.git",
"reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1",
"reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php81\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0"
},
"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": "2022-05-24T11:49:31+00:00"
},
{
"name": "symfony/process",
"version": "v5.4.11",

Просмотреть файл

@ -31,14 +31,13 @@ use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent;
class Application extends App implements IBootstrap {
/** @var string */
public const APP_ID = 'tasks';
/**
* @param array $params
*/
public function __construct(array $params=[]) {
public function __construct(array $params = []) {
parent::__construct(self::APP_ID, $params);
}

Просмотреть файл

@ -27,7 +27,6 @@ use \OCP\IRequest;
use \OCP\AppFramework\Controller;
class CollectionsController extends Controller {
/**
* @var CollectionsService
*/

Просмотреть файл

@ -32,7 +32,6 @@ use \OCP\IRequest;
* Controller class for main page.
*/
class PageController extends Controller {
/**
* @var IInitialStateService
*/

Просмотреть файл

@ -27,7 +27,6 @@ use \OCP\AppFramework\Controller;
use \OCP\IRequest;
class SettingsController extends Controller {
/**
* @var SettingsService
*/

Просмотреть файл

@ -30,7 +30,6 @@ use OCP\Dashboard\IWidget;
use OCP\IL10N;
class TasksWidget implements IWidget {
/**
* @var IL10N
*/

Просмотреть файл

@ -26,7 +26,6 @@ use OCP\IConfig;
use OCP\IL10N;
class CollectionsService {
/**
* @var string
*/
@ -99,9 +98,9 @@ class CollectionsService {
'icon' => 'Check']
];
foreach ($collections as $key => $collection) {
$tmp = $this->settings->getUserValue($this->userId, $this->appName,'show_'.$collection['id']);
$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']);
$this->settings->setUserValue($this->userId, $this->appName, 'show_'.$collection['id'], $collections[$key]['show']);
} else {
$collections[$key]['show'] = (int)$tmp;
}
@ -118,7 +117,7 @@ class CollectionsService {
*/
public function setVisibility(string $collectionID, int $visibility):bool {
if (in_array($visibility, [0,1,2])) {
$this->settings->setUserValue($this->userId, $this->appName,'show_'.$collectionID,$visibility);
$this->settings->setUserValue($this->userId, $this->appName, 'show_'.$collectionID, $visibility);
}
return true;
}

Просмотреть файл

@ -26,7 +26,6 @@ use OCP\App\IAppManager;
use OCP\IConfig;
class SettingsService {
/**
* @var ?string
*/

Просмотреть файл

@ -1,3 +1,3 @@
<?php
script('tasks', 'tasks-main');
script('tasks', 'tasks-main');