Skip to content

Commit

Permalink
Declare nullable parameter types explicitly for PHP 8.4 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
W0rma committed Jul 26, 2024
1 parent 01ff7f9 commit 78806d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Lib/Interfaces/PageSourceSaver.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ public function _savePageSource(string $filename): void;
* // saved to: tests/_output/debug/2017-05-26_14-24-11_4b3403665fea6.html
* ```
*/
public function makeHtmlSnapshot(string $name = null): void;
public function makeHtmlSnapshot(?string $name = null): void;
}
8 changes: 4 additions & 4 deletions src/Lib/Interfaces/Web.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public function dontSeeInSource(string $raw): void;
* ]);
* ```
*/
public function submitForm($selector, array $params, string $button = null): void;
public function submitForm($selector, array $params, ?string $button = null): void;

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

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

/**
* Checks that the specified checkbox is checked.
Expand Down Expand Up @@ -692,7 +692,7 @@ public function grabAttributeFrom($cssOrXpath, string $attribute): mixed;
*
* @return string[]
*/
public function grabMultiple($cssOrXpath, string $attribute = null): array;
public function grabMultiple($cssOrXpath, ?string $attribute = null): array;

/**
* Checks that the given element exists on the page and is visible.
Expand Down

0 comments on commit 78806d3

Please sign in to comment.