[PR #10804] Follow recommendation about multiline type #12630

Closed
opened 2026-01-22 16:14:40 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/10804

State: closed
Merged: Yes


Apparently, there is consensus about multiline types between:

  • PHPStan
  • Psalm
  • Slevomat Coding Standard

See https://github.com/slevomat/coding-standard/issues/1586#issuecomment-1610195706

Using parenthesis is supposed to be less ambiguous, although I cannot explain how it is ambiguous before… maybe if we had the pipes at the beginning of lines instead of the end it would be ambiguous because you could not clearly tell if the return is multiline or not?

Anyway, the change has a positive impact on the Psalm baseline, showing that psalm-return annotation was not really understood previously. Thanks @ondrejmirtes for the heads up!

**Original Pull Request:** https://github.com/doctrine/orm/pull/10804 **State:** closed **Merged:** Yes --- Apparently, there is consensus about multiline types between: - PHPStan - Psalm - Slevomat Coding Standard See https://github.com/slevomat/coding-standard/issues/1586#issuecomment-1610195706 Using parenthesis is supposed to be less ambiguous, although I cannot explain how it is ambiguous before… maybe if we had the pipes at the beginning of lines instead of the end it would be ambiguous because you could not clearly tell if the return is multiline or not? Anyway, the change has a positive impact on the Psalm baseline, showing that psalm-return annotation was not really understood previously. Thanks @ondrejmirtes for the heads up!
admin added the pull-request label 2026-01-22 16:14:40 +01:00
admin closed this issue 2026-01-22 16:14:41 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#12630