I just couldn't find an answer in the official documentation.
So PHP Code Sniffer says it's required (coding standards package escapestudios/symfony2-coding-standard
).
Example as it should be:
$result = (bool) foo();
and vise versa:
$result = (bool)foo();
Yes, it is:
In CodeSniffer, you're looking for PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\SpaceAfterCastSniff
In PHP-CS-Fixer, it would be PhpCsFixer\Fixer\CastNotation\CastSpacesFixer
Tool used in here is EasyCodingStandard - you can read intro post about it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With