Page MenuHomePhabricator

Add sniff for cast operator spacing
Closed, ResolvedPublic

Description

The guideline on the wiki says that "when type casting, do not use a space within or after the cast operator."

This is borne out by the MediaWiki codebase, where there are 1,128 of the unspaced usage, and only 18 of the spacey one (T149545 fixes them).

The Generic.Formatting.NoSpaceAfterCast rule should be added.

This has been previously discussed in T50450, and I've brought it up on-wiki at Manual_talk:Coding_conventions/PHP#Spacing_within_brackets.