Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2.0116 |
Changes | 0 |
1 | <?php |
||
27 | 3 | public function produce(Message $message, $queueName = null) |
|
28 | { |
||
29 | 3 | $queueName = $queueName ?: Util::guessQueue($message); |
|
30 | |||
31 | 3 | $queue = $this->queues->create($queueName); |
|
32 | 3 | $queue->enqueue($envelope = new Envelope($message)); |
|
33 | |||
34 | 3 | $this->dispatch(BernardEvents::PRODUCE, new EnvelopeEvent($envelope, $queue)); |
|
35 | 3 | } |
|
36 | |||
44 |