Skip to content

Conversation

Steveb-p
Copy link
Contributor

@Steveb-p Steveb-p commented Jul 12, 2024

🎫 Issue N/A

Description:

This PR introduces types_spaces rule.

We can operate on 4 sets:

  • we do set space as required for class intersection/union
  • we do set none, so no spaces
  • we differentiate between exception throwing blocks and everything else
  • we do not set anything, and let remain it on case-by-case basis.

Currently suggested:

--- Original
+++ New
 <?php
 try
 {
     new Foo();
-} catch (ErrorA|ErrorB $e) {
+} catch (ErrorA | ErrorB $e) {
 echo'error';}

For QA:

Documentation:

Copy link

@Steveb-p Steveb-p requested a review from a team July 12, 2024 08:33
@konradoboza konradoboza requested a review from a team July 12, 2024 08:39
@Steveb-p Steveb-p requested a review from a team July 12, 2024 11:02
@webhdx webhdx requested a review from a team July 12, 2024 12:20
@adamwojs adamwojs merged commit d0f8e8c into main Jul 12, 2024
@adamwojs adamwojs deleted the type-intersection branch July 12, 2024 14:18
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.

5 participants