Skip to content

Conversation

samuelmaudo
Copy link
Contributor

The Symfony rule set includes a rule to force throwing exceptions on a single line.

This means that some like this:

throw new BookingDocumentSlotAlreadyCreated(
    $bookingId,
    BookingDocumentType::passport(),
);

Becomes this:

throw new BookingDocumentSlotAlreadyCreated($bookingId, BookingDocumentType::passport());

This PR proposes to skip that rule, since it is sometimes easier to read the code if we to spread the class construction over several lines, specially when the constructor has several parameters.

@samuelmaudo samuelmaudo self-assigned this Oct 4, 2024
@samuelmaudo samuelmaudo changed the title Skip single_line_throw rule Remove single_line_throw rule Oct 4, 2024
@samuelmaudo samuelmaudo changed the title Remove single_line_throw rule Remove single_line_throw rule Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant