Skip to content

feat: add rules for trailing commas in function declarations#268

Merged
ostrolucky merged 1 commit intodoctrine:10.0.xfrom
simPod:trailing-commas
Jun 21, 2022
Merged

feat: add rules for trailing commas in function declarations#268
ostrolucky merged 1 commit intodoctrine:10.0.xfrom
simPod:trailing-commas

Conversation

@simPod
Copy link
Contributor

@simPod simPod commented Jun 19, 2022

Removes trailing commas on single line declarations

- function foo(int $x,): void
+ function foo(int $x): void
{
}

Requires comma in multiline declarations

function foo(
    $bar,
    $baz,
)

so extending args produces nice diff (one line modified)

function foo(
    $bar,
    $baz,
+   $bam,
)

@simPod simPod force-pushed the trailing-commas branch 4 times, most recently from 27054ef to f3cd3a4 Compare June 19, 2022 16:08
@simPod simPod marked this pull request as ready for review June 19, 2022 16:09
@simPod simPod requested a review from a team as a code owner June 19, 2022 16:09
@simPod simPod force-pushed the trailing-commas branch from f3cd3a4 to aede5b2 Compare June 19, 2022 20:59
@ostrolucky
Copy link
Member

Hopefully trailing commas in function calls are incoming too? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants