From d150d95d491d26346476d7803e2db1bd60c894eb Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Wed, 18 Sep 2024 13:24:15 +0200 Subject: [PATCH] style: add concat_space and nullable_type_declaration Ref https://github.com/nextcloud/coding-standard/issues/29 Ref https://github.com/nextcloud/coding-standard/issues/30 Signed-off-by: Daniel Kesselberg --- CHANGELOG.md | 2 ++ src/Config.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 454d89b..c0ca863 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file. * `MultilinePromotedPropertiesFixer`: Break promoted properties on multiple lines * `ErickSkrauch/blank_line_before_return`: Add a blank line before each return * `ErickSkrauch/line_break_after_statements`: Add a blank line after all control statements +* `concat_space`: Concatenation should be spaced +* `nullable_type_declaration`: Changes `DateTimeInterface|null` to `?DateTimeInterface` ## 1.2.3 - 2024-08-23 ### Changed diff --git a/src/Config.php b/src/Config.php index 6895b89..9bf8947 100644 --- a/src/Config.php +++ b/src/Config.php @@ -28,6 +28,7 @@ public function getRules() : array { 'blank_line_after_namespace' => true, 'blank_line_after_opening_tag' => true, 'cast_spaces' => ['space' => 'none'], + 'concat_space' => ['spacing' => 'one'], 'curly_braces_position' => [ 'classes_opening_brace' => 'same_line', 'functions_opening_brace' => 'same_line', @@ -56,6 +57,7 @@ public function getRules() : array { 'no_trailing_whitespace_in_comment' => true, 'no_unused_imports' => true, 'nullable_type_declaration_for_default_null_value' => true, + 'nullable_type_declaration' => ['syntax' => 'question_mark'], 'ordered_imports' => [ 'imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'