From 0f2185f26b408bc04a95334aa1768cfab6064349 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 21 Sep 2024 04:14:44 +0000 Subject: [PATCH 1/2] bump nextcloud/coding-standard from 1.2.3 to 1.3.1 --- updated-dependencies: - dependency-name: nextcloud/coding-standard dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 71 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 59 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 5a7186d..60abfaf 100644 --- a/composer.lock +++ b/composer.lock @@ -7,21 +7,68 @@ "content-hash": "8e716b97ebbbff36ece3317f2ba21122", "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,22 +91,22 @@ "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", - "version": "v3.62.0", + "version": "v3.64.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/shim.git", - "reference": "7a91d5ce45c486f5b445d95901228507a02f60ae" + "reference": "81ccfd24baf3a10810dab1152c403981a790b837" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/7a91d5ce45c486f5b445d95901228507a02f60ae", - "reference": "7a91d5ce45c486f5b445d95901228507a02f60ae", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/81ccfd24baf3a10810dab1152c403981a790b837", + "reference": "81ccfd24baf3a10810dab1152c403981a790b837", "shasum": "" }, "require": { @@ -96,9 +143,9 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/PHP-CS-Fixer/shim/issues", - "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.62.0" + "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.64.0" }, - "time": "2024-08-07T17:03:46+00:00" + "time": "2024-08-30T23:10:11+00:00" } ], "aliases": [], From ecb49b544b5e0bf8838809c54318e980cd962705 Mon Sep 17 00:00:00 2001 From: DorraJaouad Date: Sun, 13 Oct 2024 20:47:40 +0200 Subject: [PATCH 2/2] chore: composer run cs:fix Signed-off-by: DorraJaouad --- lib/Controller/IPWhitelistController.php | 4 ++-- tests/Controller/IPWhitelistControllerTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Controller/IPWhitelistController.php b/lib/Controller/IPWhitelistController.php index 1685f77..c5e0c5d 100644 --- a/lib/Controller/IPWhitelistController.php +++ b/lib/Controller/IPWhitelistController.php @@ -93,7 +93,7 @@ public function add(string $ip, int $mask): JSONResponse { $id++; $value = $ip . '/' . $mask; - $this->config->setAppValue('bruteForce', 'whitelist_'.$id, $value); + $this->config->setAppValue('bruteForce', 'whitelist_' . $id, $value); return new JSONResponse([ 'id' => $id, 'ip' => $ip, @@ -106,7 +106,7 @@ public function add(string $ip, int $mask): JSONResponse { * @return JSONResponse */ public function remove(int $id): JSONResponse { - $this->config->deleteAppValue('bruteForce', 'whitelist_'.$id); + $this->config->deleteAppValue('bruteForce', 'whitelist_' . $id); return new JSONResponse([]); } diff --git a/tests/Controller/IPWhitelistControllerTest.php b/tests/Controller/IPWhitelistControllerTest.php index 19dc8c3..be2b45d 100644 --- a/tests/Controller/IPWhitelistControllerTest.php +++ b/tests/Controller/IPWhitelistControllerTest.php @@ -111,7 +111,7 @@ public function testAdd($ip, $mask, $valid) { ->with( $this->equalTo('bruteForce'), $this->equalTo('whitelist_100'), - $this->equalTo($ip.'/'.$mask) + $this->equalTo($ip . '/' . $mask) ); $expected = new JSONResponse([