Skip to content

Commit 6146df0

Browse files
committed
Make constraints compatible with PHPUnit 10
1 parent 10482f7 commit 6146df0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Codeception/Constraint/Crawler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function matches($nodes): bool
4242
* @param string $selector
4343
* @param ComparisonFailure|null $comparisonFailure
4444
*/
45-
protected function fail($nodes, $selector, ComparisonFailure $comparisonFailure = null): void
45+
protected function fail($nodes, $selector, ComparisonFailure $comparisonFailure = null): never
4646
{
4747
if (!$nodes->count()) {
4848
throw new ElementNotFound($selector, 'Element located either by name, CSS or XPath');

src/Codeception/Constraint/CrawlerNot.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected function matches($nodes): bool
2424
* @param string $selector
2525
* @param ComparisonFailure|null $comparisonFailure
2626
*/
27-
protected function fail($nodes, $selector, ComparisonFailure $comparisonFailure = null): void
27+
protected function fail($nodes, $selector, ComparisonFailure $comparisonFailure = null): never
2828
{
2929
if (!$this->string) {
3030
throw new ExpectationFailedException(

0 commit comments

Comments
 (0)