We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8dcfdf commit 023a96fCopy full SHA for 023a96f
contributing/code/standards.rst
@@ -102,6 +102,9 @@ Structure
102
103
* Always use `identical comparison`_ unless you need type juggling;
104
105
+* Use `Yoda conditions`_ when checking a variable against an expression to avoid
106
+ an accidental assignment inside the condition statement;
107
+
108
* Add a comma after each array item in a multi-line array, even after the
109
last one;
110
@@ -189,3 +192,4 @@ License
189
192
.. _`PSR-2`: http://www.php-fig.org/psr/psr-2/
190
193
.. _`PSR-4`: http://www.php-fig.org/psr/psr-4/
191
194
.. _`identical comparison`: https://php.net/manual/en/language.operators.comparison.php
195
+.. _`Yoda conditions`: https://en.wikipedia.org/wiki/Yoda_conditions
0 commit comments