Skip to content

Commit 51bb8a3

Browse files
committed
formatting
1 parent 2ce3e56 commit 51bb8a3

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/Illuminate/Bus/PendingBatch.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -217,27 +217,27 @@ public function onQueue(string $queue)
217217
}
218218

219219
/**
220-
* Specify additional option.
220+
* Get the queue used by the pending batch.
221221
*
222-
* @param string $key
223-
* @param mixed $value
224-
* @return $this
222+
* @return string|null
225223
*/
226-
public function addOption(string $key, $value)
224+
public function queue()
227225
{
228-
$this->options[$key] = $value;
229-
230-
return $this;
226+
return $this->options['queue'] ?? null;
231227
}
232228

233229
/**
234-
* Get the queue used by the pending batch.
230+
* Add additional data into the batch's options array.
235231
*
236-
* @return string|null
232+
* @param string $key
233+
* @param mixed $value
234+
* @return $this
237235
*/
238-
public function queue()
236+
public function withOption(string $key, $value)
239237
{
240-
return $this->options['queue'] ?? null;
238+
$this->options[$key] = $value;
239+
240+
return $this;
241241
}
242242

243243
/**

tests/Bus/BusPendingBatchTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function test_pending_batch_may_be_configured_and_dispatched()
4141
//
4242
})->catch(function () {
4343
//
44-
})->allowFailures()->onConnection('test-connection')->onQueue('test-queue')->addOption('extra-option', 123);
44+
})->allowFailures()->onConnection('test-connection')->onQueue('test-queue')->withOption('extra-option', 123);
4545

4646
$this->assertSame('test-connection', $pendingBatch->connection());
4747
$this->assertSame('test-queue', $pendingBatch->queue());

0 commit comments

Comments
 (0)