We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59569c0 commit 844ac8eCopy full SHA for 844ac8e
contributing/code/standards.rst
@@ -100,6 +100,9 @@ Structure
100
101
* Place unary operators (``!``, ``--``, ...) adjacent to the affected variable;
102
103
+* Use `Yoda conditions`_ when checking a variable against an expression to avoid
104
+ an accidental assignment inside the condition statement;
105
+
106
* Add a comma after each array item in a multi-line array, even after the
107
last one;
108
@@ -186,3 +189,4 @@ License
186
189
.. _`PSR-1`: http://www.php-fig.org/psr/psr-1/
187
190
.. _`PSR-2`: http://www.php-fig.org/psr/psr-2/
188
191
.. _`PSR-4`: http://www.php-fig.org/psr/psr-4/
192
+.. _`Yoda conditions`: https://en.wikipedia.org/wiki/Yoda_conditions
0 commit comments