Skip to content

Commit 8c8e3f0

Browse files
authored
Set NoMultilineReturnFixer priority to run before ArrayIndentationFixer (#7)
Without this, collapsing a multiline return leaves stale indentation because `array_indentation` has already run (priority 29). Setting priority 30 ensures the return is joined first so indentation is recalculated correctly.
1 parent de03964 commit 8c8e3f0

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/Fixer/NoMultilineReturnFixer.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ function foo()
3737
);
3838
}
3939

40+
/**
41+
* Must run before ArrayIndentationFixer.
42+
*/
43+
#[Override]
44+
public function getPriority() : int
45+
{
46+
return 30;
47+
}
48+
4049
#[Override]
4150
public function isCandidate(Tokens $tokens) : bool
4251
{

0 commit comments

Comments
 (0)