Skip to content

Commit abb6d36

Browse files
committed
feat: Add blank lines before returns and after control statements
Signed-off-by: provokateurin <[email protected]>
1 parent fe1d17f commit abb6d36

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4-
## 1.2.4 - TBA
4+
## 1.3.0 - TBA
55

66
### Changed
77
* `trailing_comma_in_multiline`: Add a trailing comma to multline function parameters
88
* `MultilinePromotedPropertiesFixer`: Break promoted properties on multiple lines
9+
* `ErickSkrauch/blank_line_before_return`: Add a blank line before each return
10+
* `ErickSkrauch/line_break_after_statements`: Add a blank line after all control statements
911

1012
## 1.2.3 - 2024-08-23
1113
### Changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"require": {
66
"php": "^7.3|^8.0",
77
"php-cs-fixer/shim": "^3.17",
8-
"kubawerlos/php-cs-fixer-custom-fixers": "^3.22"
8+
"kubawerlos/php-cs-fixer-custom-fixers": "^3.22",
9+
"erickskrauch/php-cs-fixer-custom-fixers": "^1.3"
910
},
1011
"license": "MIT",
1112
"authors": [

src/Config.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public function __construct($name = 'default') {
1212
parent::__construct($name);
1313
$this->setIndent("\t");
1414
$this->registerCustomFixers(new PhpCsFixerCustomFixers\Fixers());
15+
$this->registerCustomFixers(new \ErickSkrauch\PhpCsFixer\Fixers());
1516
}
1617

1718
public function getRules() : array {
@@ -76,6 +77,8 @@ public function getRules() : array {
7677
],
7778
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
7879
PhpCsFixerCustomFixers\Fixer\MultilinePromotedPropertiesFixer::name() => true,
80+
'ErickSkrauch/blank_line_before_return' => true,
81+
'ErickSkrauch/line_break_after_statements' => true,
7982
];
8083
}
8184
}

0 commit comments

Comments
 (0)