Skip to content

Commit 2616cff

Browse files
committed
minor #18134 [Standards] Improve code standards about exception and error messages (alexandre-daubois)
This PR was merged into the 5.4 branch. Discussion ---------- [Standards] Improve code standards about exception and error messages After this one being merged symfony/symfony#49829, I think the coding standards about exception can be improved a bit 👍 Commits ------- 6d3fc80 [Standards] Improve code standards about exception and error messages
2 parents 34722b1 + 6d3fc80 commit 2616cff

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

contributing/code/standards.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,12 @@ Structure
179179

180180
* Exception and error message strings must be concatenated using :phpfunction:`sprintf`;
181181

182+
* Exception and error messages must not contain backticks, even when referring to a
183+
technical element (such as a method name for example). Double quotes must be used
184+
at all time;
185+
186+
* Exception and error messages must start with a capital letter and finish with a dot ``.``;
187+
182188
* Do not use ``else``, ``elseif``, ``break`` after ``if`` and ``case`` conditions
183189
which return or throw something;
184190

0 commit comments

Comments
 (0)