Skip to content

Commit c3ec0e5

Browse files
Copilothuangdijia
andauthored
Add type tests for AMQP and Kafka dispatch return types (#1005)
* Initial plan * Add AMQP and Kafka type tests for dispatch function Co-authored-by: huangdijia <8337659+huangdijia@users.noreply.github.com> * Fix code style - remove empty parentheses from anonymous class Co-authored-by: huangdijia <8337659+huangdijia@users.noreply.github.com> * Fix code style - break long lines for readability Co-authored-by: huangdijia <8337659+huangdijia@users.noreply.github.com> * fix: update return type annotation for dispatch function and improve type assertions in tests --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: huangdijia <8337659+huangdijia@users.noreply.github.com>
1 parent 51f4177 commit c3ec0e5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* Do not assign a value to the return value of this function unless you are very clear about the consequences of doing so.
2828
* @param Closure|JobInterface|ProduceMessage|ProducerMessageInterface|mixed $job
2929
* @param-closure-this ($job is Closure ? CallQueuedClosure : mixed) $job
30-
* @return ($job is Closure ? PendingAsyncQueueDispatch : ($job is JobInterface ? PendingAsyncQueueDispatch : ($job is ProducerMessageInterface ? PendingAmqpProducerMessageDispatch : PendingKafkaProducerMessageDispatch)))
30+
* @return ($job is Closure ? PendingAsyncQueueDispatch : ( $job is JobInterface ? PendingAsyncQueueDispatch : ( $job is ProducerMessageInterface ? PendingAmqpProducerMessageDispatch : ( $job is ProduceMessage ? PendingKafkaProducerMessageDispatch : never ))))
3131
* @throws InvalidArgumentException
3232
*/
3333
function dispatch($job)

0 commit comments

Comments
 (0)