Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare nullable parameter types explicitly for PHP 8.4 compatibility #12

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading