Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(editorconfig): ij_php_spaces_around_pipe_in_union_type #486

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

etremblay
Copy link
Contributor

@etremblay etremblay commented Oct 19, 2024

Depuis très longtemps ça me tanne que le reformat de phpstorm corresponde pas à la règle de phpcs pour les catch avec plusieurs classes.

J'ai trouvé la propriété qui force un espace autour du |

Par contre, ça a le side-effect d'ajouter l'expace pour tous les types union. Personnellement j'en met toujours un, mais je rencontre souvent du code qui en a pas. Phpcs check pas ça.

Avant

try {
} catch (TypeA|TypeB $exception) {
}

# Les deux accepté
private TypeA|TypeB $property;
private TypeA | TypeB $property;

Maintenant

try {
} catch (TypeA | TypeB $exception) {
}

# Les deux accepté
private TypeA | TypeB $property;

@etremblay etremblay requested a review from a team as a code owner October 19, 2024 21:36
@etremblay etremblay changed the title .editorconfig ij_php_spaces_around_pipe_in_union_type + decrypted yaml feat(editorconfig): ij_php_spaces_around_pipe_in_union_type + decrypted yaml Oct 19, 2024
@etremblay etremblay changed the title feat(editorconfig): ij_php_spaces_around_pipe_in_union_type + decrypted yaml feat(editorconfig): ij_php_spaces_around_pipe_in_union_type Oct 19, 2024
@etremblay etremblay added this pull request to the merge queue Oct 21, 2024
Merged via the queue into master with commit 9520b31 Oct 21, 2024
2 of 3 checks passed
@etremblay etremblay deleted the php-space-arount-union-type branch October 21, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants