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 4f63c92 commit ed6bf81Copy full SHA for ed6bf81
contributing/code/standards.rst
@@ -190,6 +190,14 @@ Structure
190
191
* Exception and error messages must start with a capital letter and finish with a dot ``.``;
192
193
+* Exception, error and deprecation messages containing a class name must
194
+ use ``get_debug_type()`` instead of ``::class`` to retrieve it:
195
+
196
+ .. code-block:: diff
197
198
+ - throw new \Exception(sprintf('Command "%s" failed.', $command::class));
199
+ + throw new \Exception(sprintf('Command "%s" failed.', get_debug_type($command)));
200
201
* Do not use ``else``, ``elseif``, ``break`` after ``if`` and ``case`` conditions
202
which return or throw something;
203
0 commit comments