Skip to content

Commit 2a35f80

Browse files
authored
NoExtraBlankLinesFixer must run before FunctionParameterSeparationFixer (#1097)
1 parent 7c3d422 commit 2a35f80

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

src/Fixer/FunctionParameterSeparationFixer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ public function __construct(
5454
}
5555

5656
/**
57-
* Must run after MethodArgumentSpaceFixer.
57+
* Must run after MethodArgumentSpaceFixer, NoExtraBlankLinesFixer.
5858
*/
5959
public function getPriority(): int
6060
{
61-
return 0;
61+
return -21;
6262
}
6363

6464
public function isCandidate(Tokens $tokens): bool
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--CONFIGURATION--
2+
{ "no_extra_blank_lines": {"tokens": ["comma"]}, "PhpCsFixerCustomFixers/function_parameter_separation": true }
3+
--EXPECTED--
4+
<?php
5+
function foo(
6+
#[Attribute1]
7+
bool $param1,
8+
9+
#[Attribute2]
10+
bool $param2,
11+
) {}
12+
13+
--INPUT--
14+
<?php
15+
function foo(
16+
#[Attribute1]
17+
bool $param1,
18+
19+
20+
#[Attribute2]
21+
bool $param2,
22+
23+
) {}

0 commit comments

Comments
 (0)