Skip to content

Commit

Permalink
Fix PHP 8.2 deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaasuni committed Sep 6, 2023
1 parent bae6d17 commit 62fa5f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.25
1.7.26
8 changes: 4 additions & 4 deletions test/TestUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,31 @@ class TestUtil extends TestCase
{
public function bcAssertEqualsWithDelta($expected, $actual, $delta = 0.01, $message = '')
{
if (\is_callable(['parent', 'assertEqualsWithDelta'])) {
if (\is_callable([self::class, 'assertEqualsWithDelta'])) {
return parent::assertEqualsWithDelta($expected, $actual, $delta, $message);
}
return $this->assertEquals($expected, $actual, $message, $delta);
}

public function bcExpectException($exception)
{
if (\is_callable(['parent', 'expectException'])) {
if (\is_callable([self::class, 'expectException'])) {
return parent::expectException($exception);
}
return parent::setExpectedException($exception);
}

public function bcAssertIsResource($res)
{
if (\is_callable(['parent', 'assertIsResource'])) {
if (\is_callable([self::class, 'assertIsResource'])) {
return parent::assertIsResource($res);
}
return parent::assertInternalType('resource', $res);
}

public function bcAssertMatchesRegularExpression($pattern, $string, $message = '')
{
if (\is_callable(['parent', 'assertMatchesRegularExpression'])) {
if (\is_callable([self::class, 'assertMatchesRegularExpression'])) {
return parent::assertMatchesRegularExpression($pattern, $string, $message);
}
return parent::assertRegExp($pattern, $string, $message);
Expand Down

0 comments on commit 62fa5f0

Please sign in to comment.