Skip to content

Commit 76275c9

Browse files
committed
Removed implicitly nullable arguments
1 parent cda3969 commit 76275c9

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/SessionStorage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function userId(): ?string;
2828
*
2929
* @param string|null $userId
3030
*/
31-
public function newUserContext(string $userId = null): void;
31+
public function newUserContext(?string $userId = null): void;
3232

3333
/**
3434
* @param string $key
@@ -47,7 +47,7 @@ public function get(string $key, $default = null);
4747

4848
/**
4949
* @param string $key
50-
* @param $value
50+
* @param mixed $value
5151
*/
5252
public function set(string $key, $value): void;
5353

src/SessionStorage/ContextSessionStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct(SessionContext $context, array $data = [])
3333
$this->data = $data;
3434
}
3535

36-
public function newUserContext(string $userId = null): void
36+
public function newUserContext(?string $userId = null): void
3737
{
3838
$this->userId = $userId;
3939
$this->context->reset();

tests/Doubles/FakeRequestHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class FakeRequestHandler implements RequestHandlerInterface
2020
{
2121
private $process;
2222

23-
public function __construct(callable $process = null)
23+
public function __construct(?callable $process = null)
2424
{
2525
$this->process = $process;
2626
}

tests/Fixtures/session-functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ function session_status(): int
2828
return SessionGlobalState::$status;
2929
}
3030

31-
function session_name(string $name = null): string
31+
function session_name(?string $name = null): string
3232
{
3333
return $name ? SessionGlobalState::$name = $name : SessionGlobalState::$name;
3434
}
3535

36-
function session_id(string $id = null): string
36+
function session_id(?string $id = null): string
3737
{
3838
return $id ? SessionGlobalState::$id = $id : SessionGlobalState::$id;
3939
}

tests/SessionContext/NativeSessionContextTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private function request($cookie = false): Doubles\FakeServerRequest
143143
return $request;
144144
}
145145

146-
private function handler(callable $process = null): Doubles\FakeRequestHandler
146+
private function handler(?callable $process = null): Doubles\FakeRequestHandler
147147
{
148148
return new Doubles\FakeRequestHandler($process);
149149
}

0 commit comments

Comments
 (0)