Skip to content

Commit a68d3e5

Browse files
bryanageeweaverryan
authored andcommitted
[RFC] Clarification on formatting for bangs (!)
It seems to me that > Add a single space around operators would mean using the practice on the bang operator as well; as discussed in [this thread](https://github.com/php-fig/fig-standards/issues/102), there is somewhat of a conflict--so this may not be the way to go. If the PSR could be amended, then this change would make sense.
1 parent 0a9c146 commit a68d3e5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

contributing/code/standards.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,22 @@ example containing most features described below:
7979

8080
throw new \RuntimeException(sprintf('Unrecognized dummy option "%s"', $dummy));
8181
}
82+
83+
private function reverseBoolean($value = null)
84+
{
85+
if ( ! isset($value)) {
86+
return;
87+
}
88+
return ! $value;
89+
}
8290
}
8391

8492
Structure
8593
---------
8694

8795
* Add a single space after each comma delimiter;
8896

89-
* Add a single space around operators (``==``, ``&&``, ...);
97+
* Add a single space around operators (``==``, ``&&``, ``!``, ...);
9098

9199
* Add a comma after each array item in a multi-line array, even after the
92100
last one;

0 commit comments

Comments
 (0)