From 8a61acc43de3ffd85978ebc7126f7247d4d62b40 Mon Sep 17 00:00:00 2001 From: dartcafe Date: Tue, 26 Oct 2021 21:11:49 +0200 Subject: [PATCH 1/3] use php-cs-fixer ^3.2 Signed-off-by: dartcafe --- .php_cs.dist => .php-cs-fixer.dist.php | 0 composer.json | 4 ++-- src/Config.php | 12 ++++-------- 3 files changed, 6 insertions(+), 10 deletions(-) rename .php_cs.dist => .php-cs-fixer.dist.php (100%) diff --git a/.php_cs.dist b/.php-cs-fixer.dist.php similarity index 100% rename from .php_cs.dist rename to .php-cs-fixer.dist.php diff --git a/composer.json b/composer.json index e8ffd28..d5f8630 100644 --- a/composer.json +++ b/composer.json @@ -3,8 +3,8 @@ "description": "Nextcloud coding standards for the php cs fixer", "type": "library", "require": { - "php": "^7.2|^8.0", - "friendsofphp/php-cs-fixer": "^2.17" + "php": "^7.4|^8.0", + "friendsofphp/php-cs-fixer": "^3.2" }, "license": "MIT", "authors": [ diff --git a/src/Config.php b/src/Config.php index 4755008..ed9d0ef 100644 --- a/src/Config.php +++ b/src/Config.php @@ -12,15 +12,12 @@ public function __construct($name = 'default') { $this->setIndent("\t"); } - public function getRules() { + public function getRules() : array { return [ '@PSR1' => true, '@PSR2' => true, 'align_multiline_comment' => true, 'array_indentation' => true, - 'array_syntax' => [ - 'syntax' => 'short', - ], 'binary_operator_spaces' => [ 'default' => 'single_space', ], @@ -39,11 +36,10 @@ public function getRules() { ], 'indentation_type' => true, 'line_ending' => true, - 'list_syntax' => [ - 'syntax' => 'short', - ], 'lowercase_keywords' => true, - 'method_argument_space' => [], + 'method_argument_space' => [ + 'on_multiline' => 'ignore', + ], 'no_closing_tag' => true, 'no_spaces_after_function_name' => true, 'no_spaces_inside_parenthesis' => true, From 8f6536548a46dd15b2633d8426191497760c0b78 Mon Sep 17 00:00:00 2001 From: dartcafe Date: Tue, 26 Oct 2021 21:17:25 +0200 Subject: [PATCH 2/3] ignore changed cache dir Signed-off-by: dartcafe --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ec2f613..5d11b93 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ composer.phar /.idea .php_cs.cache +.php-cs-fixer.cache From 38f3845679c3f42c152fafcc45eaea05baf70824 Mon Sep 17 00:00:00 2001 From: dartcafe Date: Wed, 27 Oct 2021 20:52:34 +0200 Subject: [PATCH 3/3] support PHP 7.3 Signed-off-by: dartcafe --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d5f8630..ebfef6e 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Nextcloud coding standards for the php cs fixer", "type": "library", "require": { - "php": "^7.4|^8.0", + "php": "^7.3|^8.0", "friendsofphp/php-cs-fixer": "^3.2" }, "license": "MIT",