Skip to content

Commit 07b3ba3

Browse files
committed
rename method
1 parent bbb6a71 commit 07b3ba3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Exception/UserException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#[Attribute(Attribute::TARGET_CLASS)]
2626
class UserException extends Exception
2727
{
28-
public static function is(Throwable $throwable): bool
28+
public static function isUserException(Throwable $throwable): bool
2929
{
3030
if ($throwable instanceof self) {
3131
return true;

templates/production.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @var HtmlRenderer $this
1010
*/
1111

12-
if (UserException::is($throwable)) {
12+
if (UserException::isUserException($throwable)) {
1313
$name = $this->getThrowableName($throwable);
1414
$message = $throwable->getMessage();
1515
} else {

tests/Exception/UserException/UserExceptionTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ public function testUserExceptionInstance(): void
2323
assertInstanceOf(Exception::class, $exception);
2424
}
2525

26-
public static function dataIs(): iterable
26+
public static function dataIsUserException(): iterable
2727
{
2828
yield [true, new UserException()];
2929
yield [false, new Exception()];
3030
yield [true, new NotFoundException()];
3131
}
3232

33-
#[DataProvider('dataIs')]
34-
public function testIs(bool $expected, Throwable $exception): void
33+
#[DataProvider('dataIsUserException')]
34+
public function testIsUserException(bool $expected, Throwable $exception): void
3535
{
36-
assertSame($expected, UserException::is($exception));
36+
assertSame($expected, UserException::isUserException($exception));
3737
}
3838
}

0 commit comments

Comments
 (0)