Skip to content

Commit

Permalink
Fix: Do not attempt to return something from methods that do not retu…
Browse files Browse the repository at this point in the history
…rn anything
  • Loading branch information
localheinz committed Jan 2, 2024
1 parent 145af61 commit 03bbbc3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/Assertions.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@

trait Assertions
{
protected function assertRegExpCustom($expression, $string, $message = '')
protected function assertRegExpCustom($expression, $string, $message = ''): void
{
if (method_exists($this, 'assertMatchesRegularExpression')) {
return $this->assertMatchesRegularExpression($expression, $string, $message);
$this->assertMatchesRegularExpression($expression, $string, $message);

return;
}

return $this->assertRegExp($expression, $string, $message);
$this->assertRegExp($expression, $string, $message);
}
}

0 comments on commit 03bbbc3

Please sign in to comment.