From a5b23c50f2ce043d80c3df9af5ebeac42ca3f7ad Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Mon, 14 Oct 2024 17:02:28 +0200 Subject: [PATCH] style: add type_declaration_spaces To ensure a single between type hint and varialbe name Signed-off-by: Daniel Kesselberg --- CHANGELOG.md | 4 ++++ src/Config.php | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62c2a85..735df6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog All notable changes to this project will be documented in this file. +## 1.3.2 - 2024-10-14 +### Added +* `type_declaration_spaces`: A single space between typehint and variable name + ## 1.3.1 - 2024-09-19 ### Fixed * Removed misbehaving `ErickSkrauch/blank_line_before_return` and `ErickSkrauch/line_break_after_statements` rules diff --git a/src/Config.php b/src/Config.php index 8acf85d..11a788a 100644 --- a/src/Config.php +++ b/src/Config.php @@ -73,6 +73,7 @@ public function getRules() : array { 'switch_case_space' => true, 'trailing_comma_in_multiline' => ['elements' => ['parameters']], 'types_spaces' => ['space' => 'none', 'space_multiple_catch' => 'none'], + 'type_declaration_spaces' => ['elements' => ['function', 'property']], 'visibility_required' => [ 'elements' => ['property', 'method', 'const'] ],