Skip to content

Commit 46f1463

Browse files
aarondfrancisclaude
andcommitted
Remove nullable type from exceptionIsFlaky method
The method is only called after null is already checked by the caller, so the nullable type hint was misleading and could cause null dereference if called directly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 96288b4 commit 46f1463

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Flaky.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ protected function shouldThrowImmediately(?Throwable $exception = null): bool
235235
return $this->protectionsBypassed() || !$this->exceptionIsFlaky($exception);
236236
}
237237

238-
protected function exceptionIsFlaky(?Throwable $exception = null): bool
238+
protected function exceptionIsFlaky(Throwable $exception): bool
239239
{
240240
return $this->flakyExceptions === null || in_array($exception::class, $this->flakyExceptions, true);
241241
}

0 commit comments

Comments
 (0)