You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the negation formatting is not explicitly specified in the standard.
It can be written either:
with no spaces if (!is_array($foo))
with space after if (! is_array($foo))
with spaces around if ( ! is_array($foo))
In the Scalar types chapter there is a code example which includes negation formatted without spaces around:
<?phpif (!is_int($foo)) {
return (int) $foo;
}
So it would be nice to have it explicitly stated in the coding standard. Maybe eventually also checked automatically (but PHP_CodeSniffer currently offers only SpaceAfterNotSniff).