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
decide about spaces after/before exclamation mark #113
Comments
Personaly and for me i think: *Ok no official standard but the current used one. 😄 |
I choose b. |
I use (b) for years, I don't have problems spotting it, and I'd say it's defacto unwritten PHP standard. And prevails throughout the J! Core code. As said in the original ticket - if one wants to emphasize the check, use So, definitely (b) as a official standard. |
(b) +1 |
C) if (! $var) |
👍 (b) |
C) |
B, C +1 |
C Simon Asika notifications@github.com schrieb am Mi., 22. Juli 2015 10:09:
|
There is nothing that I can see in the PSR-2 standard or in the proposed PSR-12 standard in relation to this code style item. This is one of the many cases where PSR-2 and the future PSR-12 does not cover things we would like to enforce. |
seems most people like b, closing it |
In this PR https://github.com/joomla/joomla-cms/pull/7292/files#r33676349 the question raised if we should allow or deny a space after a exclamation mark in a condition. There is a longer discussion about this here: https://github.com/php-fig/fig-standards/issues/102 and https://github.com/php-fig/fig-standards/issues/165.
so how should we write it:
a)
if ( ! condition)
Space before and after the exclamation mark
or
b)
if (!condition)
Happy commenting :-)
The text was updated successfully, but these errors were encountered: