From 78620a7e6c084b8d499d60f84f3dc3460588271d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 19 Sep 2024 11:36:56 +0200 Subject: [PATCH 1/2] feat(codingstandard): Update coding-standard to 1.3.1 Signed-off-by: Joas Schilling --- vendor-bin/csfixer/composer.json | 2 +- vendor-bin/csfixer/composer.lock | 61 ++++++++++++++++++++++++++++---- 2 files changed, 55 insertions(+), 8 deletions(-) diff --git a/vendor-bin/csfixer/composer.json b/vendor-bin/csfixer/composer.json index e6306c1cabc..11fff74ff6a 100644 --- a/vendor-bin/csfixer/composer.json +++ b/vendor-bin/csfixer/composer.json @@ -7,6 +7,6 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.62.0", - "nextcloud/coding-standard": "^1.2.3" + "nextcloud/coding-standard": "^1.3.1" } } diff --git a/vendor-bin/csfixer/composer.lock b/vendor-bin/csfixer/composer.lock index 43265d0e4a2..ce3a7d1761a 100644 --- a/vendor-bin/csfixer/composer.lock +++ b/vendor-bin/csfixer/composer.lock @@ -4,24 +4,71 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9a57fd35912e7c5840b35d324996fd6d", + "content-hash": "12170705e6ac03f78e0d90a9b5b73776", "packages": [], "packages-dev": [ + { + "name": "kubawerlos/php-cs-fixer-custom-fixers", + "version": "v3.22.0", + "source": { + "type": "git", + "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", + "reference": "8701394f0c7cd450ac4fa577d24589122c1d5d5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/8701394f0c7cd450ac4fa577d24589122c1d5d5e", + "reference": "8701394f0c7cd450ac4fa577d24589122c1d5d5e", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "ext-tokenizer": "*", + "friendsofphp/php-cs-fixer": "^3.61.1", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6.4 || ^10.5.29" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpCsFixerCustomFixers\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kuba Werłos", + "email": "werlos@gmail.com" + } + ], + "description": "A set of custom fixers for PHP CS Fixer", + "support": { + "issues": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues", + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.22.0" + }, + "time": "2024-08-16T20:44:35+00:00" + }, { "name": "nextcloud/coding-standard", - "version": "v1.2.3", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "bc9c53a5306114b60c4363057aff9c2ed10a54da" + "reference": "e88acb0df6217b808d1632286ddfec9267a102e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/bc9c53a5306114b60c4363057aff9c2ed10a54da", - "reference": "bc9c53a5306114b60c4363057aff9c2ed10a54da", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/e88acb0df6217b808d1632286ddfec9267a102e4", + "reference": "e88acb0df6217b808d1632286ddfec9267a102e4", "shasum": "" }, "require": { + "kubawerlos/php-cs-fixer-custom-fixers": "^3.22", "php": "^7.3|^8.0", "php-cs-fixer/shim": "^3.17" }, @@ -44,9 +91,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/v1.2.3" + "source": "https://github.com/nextcloud/coding-standard/tree/v1.3.1" }, - "time": "2024-08-23T14:32:32+00:00" + "time": "2024-09-19T09:07:10+00:00" }, { "name": "php-cs-fixer/shim", From 7f20f46fb46ad198dc7d494901123fcfab4b4d73 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 19 Sep 2024 11:37:36 +0200 Subject: [PATCH 2/2] fix(codingstandard): Apply autofixes Signed-off-by: Joas Schilling --- lib/Command/Developer/UpdateDocs.php | 2 +- lib/Signaling/Responses/DialOut.php | 1 - lib/Signaling/Responses/DialOutError.php | 2 -- lib/Signaling/Responses/Response.php | 1 - tests/php/bootstrap.php | 2 +- 5 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/Command/Developer/UpdateDocs.php b/lib/Command/Developer/UpdateDocs.php index 0becab0349a..60e0eb8492f 100644 --- a/lib/Command/Developer/UpdateDocs.php +++ b/lib/Command/Developer/UpdateDocs.php @@ -75,7 +75,7 @@ protected function getDocumentation(Command $command): string { $command->getUsages() ), function ($carry, $usage) { - return $carry.'* `' . $usage . '`' . "\n"; + return $carry . '* `' . $usage . '`' . "\n"; } ); $doc .= $this->describeInputDefinition($command); diff --git a/lib/Signaling/Responses/DialOut.php b/lib/Signaling/Responses/DialOut.php index 79fe038f582..3a92678614b 100644 --- a/lib/Signaling/Responses/DialOut.php +++ b/lib/Signaling/Responses/DialOut.php @@ -32,7 +32,6 @@ final class DialOut { public function __construct( /** @var non-empty-string|null */ public ?string $callId = null, - public ?DialOutError $error = null, ) { } diff --git a/lib/Signaling/Responses/DialOutError.php b/lib/Signaling/Responses/DialOutError.php index 795f2ffc532..ae1fc3e5b18 100644 --- a/lib/Signaling/Responses/DialOutError.php +++ b/lib/Signaling/Responses/DialOutError.php @@ -25,9 +25,7 @@ final class DialOutError { public function __construct( /** @var non-empty-string */ public ?string $code, - public ?string $message = null, - /** @var ?array{attendeeId: int} */ public ?array $details = null, ) { diff --git a/lib/Signaling/Responses/Response.php b/lib/Signaling/Responses/Response.php index 40270c7e370..c988297b6c0 100644 --- a/lib/Signaling/Responses/Response.php +++ b/lib/Signaling/Responses/Response.php @@ -13,7 +13,6 @@ final class Response { public function __construct( /** @var non-empty-string */ public string $type, - /** @var DialOut|null */ public ?DialOut $dialOut, ) { diff --git a/tests/php/bootstrap.php b/tests/php/bootstrap.php index cedea1732af..87e0cf335ba 100644 --- a/tests/php/bootstrap.php +++ b/tests/php/bootstrap.php @@ -7,7 +7,7 @@ if (!defined('PHPUNIT_RUN')) { define('PHPUNIT_RUN', 1); } -require_once __DIR__.'/../../../../lib/base.php'; +require_once __DIR__ . '/../../../../lib/base.php'; \OC::$loader->addValidRoot(\OC::$SERVERROOT . '/tests'); \OC_App::loadApp('spreed'); if (!class_exists('\PHPUnit\Framework\TestCase')) {