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,