Skip to content

Commit

Permalink
formatting and method name
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jan 30, 2020
1 parent 9d67101 commit 8a3cdb0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Bus/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ protected function pushCommandToQueue($queue, $command)
* @param mixed $handler
* @return void
*/
public function dispatchEventually($command, $handler = null)
public function dispatchAfterResponse($command, $handler = null)
{
$this->container->terminating(function () use ($command, $handler) {
$this->dispatchNow($command, $handler);
Expand Down
10 changes: 10 additions & 0 deletions src/Illuminate/Foundation/Bus/Dispatchable.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ public static function dispatchNow()
return app(Dispatcher::class)->dispatchNow(new static(...func_get_args()));
}

/**
* Dispatch a command to its appropriate handler after the current process.
*
* @return mixed
*/
public static function dispatchAfterResponse()
{
return app(Dispatcher::class)->dispatchAfterResponse(new static(...func_get_args()));
}

/**
* Set the jobs that should run if this job is successful.
*
Expand Down
14 changes: 0 additions & 14 deletions src/Illuminate/Foundation/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,20 +414,6 @@ function dispatch_now($job, $handler = null)
}
}

if (! function_exists('dispatch_eventually')) {
/**
* Dispatch a command to its appropriate handler after the current process.
*
* @param mixed $job
* @param mixed $handler
* @return void
*/
function dispatch_eventually($job, $handler = null)
{
return app(Dispatcher::class)->dispatchEventually($job, $handler);
}
}

if (! function_exists('elixir')) {
/**
* Get the path to a versioned Elixir file.
Expand Down

0 comments on commit 8a3cdb0

Please sign in to comment.