Skip to content

Commit

Permalink
Merge pull request #38 from samsonasik/update-to-usephp81
Browse files Browse the repository at this point in the history
Update to use PHP 8.1 syntax
  • Loading branch information
gsteel authored Nov 3, 2024
2 parents f285c48 + cd9922f commit ce10e74
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 ce10e74

Please sign in to comment.