Skip to content

Commit

Permalink
Add explicit nullable type declaration (#50922)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jubeki authored Apr 4, 2024
1 parent 3233f59 commit d9460ce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DatabaseSessionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class DatabaseSessionHandler implements ExistenceAwareInterface, SessionHandlerI
* @param \Illuminate\Contracts\Container\Container|null $container
* @return void
*/
public function __construct(ConnectionInterface $connection, $table, $minutes, Container $container = null)
public function __construct(ConnectionInterface $connection, $table, $minutes, ?Container $container = null)
{
$this->table = $table;
$this->minutes = $minutes;
Expand Down
4 changes: 2 additions & 2 deletions Middleware/StartSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class StartSession
* @param callable|null $cacheFactoryResolver
* @return void
*/
public function __construct(SessionManager $manager, callable $cacheFactoryResolver = null)
public function __construct(SessionManager $manager, ?callable $cacheFactoryResolver = null)
{
$this->manager = $manager;
$this->cacheFactoryResolver = $cacheFactoryResolver;
Expand Down Expand Up @@ -286,7 +286,7 @@ protected function sessionConfigured()
* @param array|null $config
* @return bool
*/
protected function sessionIsPersistent(array $config = null)
protected function sessionIsPersistent(?array $config = null)
{
$config = $config ?: $this->manager->getSessionConfig();

Expand Down
4 changes: 2 additions & 2 deletions SymfonySessionDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function setName(string $name): void
/**
* {@inheritdoc}
*/
public function invalidate(int $lifetime = null): bool
public function invalidate(?int $lifetime = null): bool
{
$this->store->invalidate();

Expand All @@ -81,7 +81,7 @@ public function invalidate(int $lifetime = null): bool
/**
* {@inheritdoc}
*/
public function migrate(bool $destroy = false, int $lifetime = null): bool
public function migrate(bool $destroy = false, ?int $lifetime = null): bool
{
$this->store->migrate($destroy);

Expand Down

0 comments on commit d9460ce

Please sign in to comment.