Skip to content

Commit

Permalink
Merge pull request #32 from nextcloud/feat/return-control-blank-lines
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Sep 18, 2024
2 parents 233bb15 + abb6d36 commit 67da46e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Changelog
All notable changes to this project will be documented in this file.

## 1.2.4 - TBA
## 1.3.0 - TBA

### Changed
* `trailing_comma_in_multiline`: Add a trailing comma to multline function parameters
* `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

## 1.2.3 - 2024-08-23
### Changed
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"require": {
"php": "^7.3|^8.0",
"php-cs-fixer/shim": "^3.17",
"kubawerlos/php-cs-fixer-custom-fixers": "^3.22"
"kubawerlos/php-cs-fixer-custom-fixers": "^3.22",
"erickskrauch/php-cs-fixer-custom-fixers": "^1.3"
},
"license": "MIT",
"authors": [
Expand Down
3 changes: 3 additions & 0 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public function __construct($name = 'default') {
parent::__construct($name);
$this->setIndent("\t");
$this->registerCustomFixers(new PhpCsFixerCustomFixers\Fixers());
$this->registerCustomFixers(new \ErickSkrauch\PhpCsFixer\Fixers());
}

public function getRules() : array {
Expand Down Expand Up @@ -76,6 +77,8 @@ public function getRules() : array {
],
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
PhpCsFixerCustomFixers\Fixer\MultilinePromotedPropertiesFixer::name() => true,
'ErickSkrauch/blank_line_before_return' => true,
'ErickSkrauch/line_break_after_statements' => true,
];
}
}

0 comments on commit 67da46e

Please sign in to comment.