Skip to content

Conversation

@alies-dev
Copy link
Contributor

Add proper callable type hints that document the callback signatures for batch-related methods in BusFake and ChainedBatchTruthTest.

Changes:

  • BusFake::chainedBatch() - @param \Closure(\Illuminate\Bus\PendingBatch): bool
  • BusFake::assertBatched() - @param callable(\Illuminate\Bus\PendingBatch): bool
  • BusFake::batched() - @param callable(\Illuminate\Bus\PendingBatch): bool and @return \Illuminate\Support\Collection<int, \Illuminate\Bus\PendingBatch>
  • ChainedBatchTruthTest::$callback and constructor - @var/@param \Closure(\Illuminate\Bus\PendingBatch): bool

This improves IDE autocompletion and static analysis support when using these testing methods.

Add proper callable type hints that document the callback signatures.
This improves IDE autocompletion and static analysis support.
@taylorotwell taylorotwell merged commit 42d4410 into laravel:12.x Dec 10, 2025
72 checks passed
@alies-dev alies-dev deleted the fix/bus-fake-phpdoc-closure-types branch December 10, 2025 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants