8000 Minor syntax tweak · symfony/symfony-docs@740e44f · GitHub
[go: up one dir, main page]

Skip to content

Commit 740e44f

Browse files
committed
Minor syntax tweak
1 parent 71c3495 commit 740e44f

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

reference/configuration/framework.rst

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3612,21 +3612,19 @@ use the configuration of the first exception that matches ``instanceof``:
36123612
status_code: 422
36133613
36143614
You can map a status code and a set of headers to an exception thanks
3615-
to the ``#[WithHttpStatus]`` attribute on the exception class:
3615+
to the ``#[WithHttpStatus]`` attribute on the exception class::
36163616

3617-
.. code-block:: php
3617+
namespace App\Exception;
36183618

3619-
namespace App\Exception;
3619+
use Symfony\Component\HttpKernel\Attribute\WithHttpStatus;
36203620

3621-
use Symfony\Component\HttpKernel\Attribute\WithHttpStatus;
3622-
3623-
#[WithHttpStatus(422, [
3624-
'Retry-After' => 10,
3625-
'X-Custom-Header' => 'header-value',
3626-
])]
3627-
class CustomException extends \Exception
3628-
{
3629-
}
3621+
#[WithHttpStatus(422, [
3622+
'Retry-After' => 10,
3623+
'X-Custom-Header' => 'header-value',
3624+
])]
3625+
class CustomException extends \Exception
3626+
{
3627+
}
36303628

36313629
.. versionadded:: 6.3
36323630

0 commit comments

Comments
 (0)
0