php-coding-standards icon indicating copy to clipboard operation
php-coding-standards copied to clipboard

[Feature Request]: Add check for whitespace after type casting

Open tyrann0us opened this issue 3 years ago • 0 comments
trafficstars

Is your feature request related to a problem?

Currently, there is no rule that checks whether there is a space after the type casting. As a result, several spellings exist.

Without a space:

return (int)$lowStockThreshold;

With spaces:

return (string) max($lowStockThresholds);

Describe the desired solution

Add a rule that checks that there is a space after the type casting.

Describe the alternatives that you have considered

None.

Additional context

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

tyrann0us avatar Mar 16 '22 10:03 tyrann0us