Skip to content

Commit

Permalink
Update to use PHP 8.1 syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
  • Loading branch information
samsonasik committed Nov 3, 2024
1 parent f285c48 commit cd9922f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/FlashMessageMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class FlashMessageMiddleware implements MiddlewareInterface

public function __construct(
string $flashMessagesClass = FlashMessages::class,
private string $sessionKey = FlashMessagesInterface::FLASH_NEXT,
private string $attributeKey = self::FLASH_ATTRIBUTE
private readonly string $sessionKey = FlashMessagesInterface::FLASH_NEXT,
private readonly string $attributeKey = self::FLASH_ATTRIBUTE
) {
$factory = [$flashMessagesClass, 'createFromSession'];
if (! is_callable($factory)) {
Expand Down
2 changes: 1 addition & 1 deletion src/FlashMessages.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class FlashMessages implements FlashMessagesInterface
/** @var array<string,mixed> */
private array $currentMessages = [];

private function __construct(private SessionInterface $session, private string $sessionKey)
private function __construct(private readonly SessionInterface $session, private readonly string $sessionKey)
{
$this->prepareMessages($session, $sessionKey);
}
Expand Down

0 comments on commit cd9922f

Please sign in to comment.