Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 006234a

Browse files
committed
Added constant visibility
As we required PHP 7.1+ we can define visibility for constants.
1 parent 789f772 commit 006234a

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

docs/book/cookbook/setting-locale-depending-routing-parameter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ use Psr\Http\Message\ServerRequestInterface;
152152
153153
class LocalizationMiddleware implements MiddlewareInterface
154154
{
155-
const LOCALIZATION_ATTRIBUTE = 'locale';
155+
public const LOCALIZATION_ATTRIBUTE = 'locale';
156156
157157
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
158158
{

src/Handler/NotFoundHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
class NotFoundHandler implements RequestHandlerInterface
1919
{
20-
const TEMPLATE_DEFAULT = 'error::404';
21-
const LAYOUT_DEFAULT = 'layout::default';
20+
public const TEMPLATE_DEFAULT = 'error::404';
21+
public const LAYOUT_DEFAULT = 'layout::default';
2222

2323
/**
2424
* @var TemplateRendererInterface

src/Middleware/ErrorResponseGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
class ErrorResponseGenerator
1919
{
20-
const TEMPLATE_DEFAULT = 'error::error';
20+
public const TEMPLATE_DEFAULT = 'error::error';
2121

2222
/**
2323
* @var bool

src/Middleware/ImplicitHeadMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
*/
4646
class ImplicitHeadMiddleware implements MiddlewareInterface
4747
{
48-
const FORWARDED_HTTP_METHOD_ATTRIBUTE = 'forwarded_http_method';
48+
public const FORWARDED_HTTP_METHOD_ATTRIBUTE = 'forwarded_http_method';
4949

5050
/**
5151
* @var null|ResponseInterface

0 commit comments

Comments
 (0)