Skip to content

Commit c797449

Browse files
committed
Define nullable parameter types explicitly
Not doing so will become deprecated in PHP 8.4
1 parent 5ec365a commit c797449

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Codeception/Module/REST.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@ public function dontSeeResponseContainsJson(array $json = []): void
13301330
* @part json
13311331
* @see JsonType
13321332
*/
1333-
public function seeResponseMatchesJsonType(array $jsonType, string $jsonPath = null): void
1333+
public function seeResponseMatchesJsonType(array $jsonType, ?string $jsonPath = null): void
13341334
{
13351335
$jsonArray = new JsonArray($this->connectionModule->_getResponseContent());
13361336
if ($jsonPath) {
@@ -1347,7 +1347,7 @@ public function seeResponseMatchesJsonType(array $jsonType, string $jsonPath = n
13471347
* @param array $jsonType JsonType structure
13481348
* @see seeResponseMatchesJsonType
13491349
*/
1350-
public function dontSeeResponseMatchesJsonType(array $jsonType, string $jsonPath = null): void
1350+
public function dontSeeResponseMatchesJsonType(array $jsonType, ?string $jsonPath = null): void
13511351
{
13521352
$jsonArray = new JsonArray($this->connectionModule->_getResponseContent());
13531353
if ($jsonPath) {

src/Codeception/Step/AsJson.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class AsJson extends Action implements GeneratedStep
99
{
10-
public function run(ModuleContainer $container = null)
10+
public function run(?ModuleContainer $container = null)
1111
{
1212
$container->getModule('REST')->haveHttpHeader('Content-Type', 'application/json');
1313
$resp = parent::run($container);

0 commit comments

Comments
 (0)