Skip to content

Commit bc7c96a

Browse files
authored
Declare nullable parameter types explicitly for PHP 8.4 compatibility (#12)
1 parent 01ff7f9 commit bc7c96a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Lib/Interfaces/PageSourceSaver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ public function _savePageSource(string $filename): void;
2727
* // saved to: tests/_output/debug/2017-05-26_14-24-11_4b3403665fea6.html
2828
* ```
2929
*/
30-
public function makeHtmlSnapshot(string $name = null): void;
30+
public function makeHtmlSnapshot(?string $name = null): void;
3131
}

src/Lib/Interfaces/Web.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public function dontSeeInSource(string $raw): void;
275275
* ]);
276276
* ```
277277
*/
278-
public function submitForm($selector, array $params, string $button = null): void;
278+
public function submitForm($selector, array $params, ?string $button = null): void;
279279

280280
/**
281281
* Perform a click on a link or a button, given by a locator.
@@ -317,7 +317,7 @@ public function click($link, $context = null): void;
317317
* $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
318318
* ```
319319
*/
320-
public function seeLink(string $text, string $url = null): void;
320+
public function seeLink(string $text, ?string $url = null): void;
321321

322322
/**
323323
* Checks that the page doesn't contain a link with the given string.
@@ -410,7 +410,7 @@ public function dontSeeCurrentUrlMatches(string $uri): void;
410410
* $uri = $I->grabFromCurrentUrl();
411411
* ```
412412
*/
413-
public function grabFromCurrentUrl(string $uri = null): mixed;
413+
public function grabFromCurrentUrl(?string $uri = null): mixed;
414414

415415
/**
416416
* Checks that the specified checkbox is checked.
@@ -692,7 +692,7 @@ public function grabAttributeFrom($cssOrXpath, string $attribute): mixed;
692692
*
693693
* @return string[]
694694
*/
695-
public function grabMultiple($cssOrXpath, string $attribute = null): array;
695+
public function grabMultiple($cssOrXpath, ?string $attribute = null): array;
696696

697697
/**
698698
* Checks that the given element exists on the page and is visible.

0 commit comments

Comments
 (0)