Skip to content

Commit

Permalink
[8.x] Allow QueuedClosure as Eloquent events callback typing (#39776)
Browse files Browse the repository at this point in the history
* Allow QueuedClosure as Eloquent events callback typing

* formatting

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
tuarrep and taylorotwell committed Nov 26, 2021
1 parent 9d902d3 commit 75bf358
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/Illuminate/Database/Eloquent/Concerns/HasEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function removeObservableEvents($observables)
* Register a model event with the dispatcher.
*
* @param string $event
* @param \Closure|string $callback
* @param \Illuminate\Events\QueuedClosure|\Closure|string $callback
* @return void
*/
protected static function registerModelEvent($event, $callback)
Expand Down Expand Up @@ -230,7 +230,7 @@ protected function filterModelEventResults($result)
/**
* Register a retrieved model event with the dispatcher.
*
* @param \Closure|string $callback
* @param \Illuminate\Events\QueuedClosure|\Closure|string $callback
* @return void
*/
public static function retrieved($callback)
Expand All @@ -241,7 +241,7 @@ public static function retrieved($callback)
/**
* Register a saving model event with the dispatcher.
*
* @param \Closure|string $callback
* @param \Illuminate\Events\QueuedClosure|\Closure|string $callback
* @return void
*/
public static function saving($callback)
Expand All @@ -252,7 +252,7 @@ public static function saving($callback)
/**
* Register a saved model event with the dispatcher.
*
* @param \Closure|string $callback
* @param \Illuminate\Events\QueuedClosure|\Closure|string $callback
* @return void
*/
public static function saved($callback)
Expand All @@ -263,7 +263,7 @@ public static function saved($callback)
/**
* Register an updating model event with the dispatcher.
*
* @param \Closure|string $callback
* @param \Illuminate\Events\QueuedClosure|\Closure|string $callback
* @return void
*/
public static function updating($callback)
Expand All @@ -274,7 +274,7 @@ public static function updating($callback)
/**
* Register an updated model event with the dispatcher.
*
* @param \Closure|string $callback
* @param \Illuminate\Events\QueuedClosure|\Closure|string $callback
* @return void
*/
public static function updated($callback)
Expand All @@ -285,7 +285,7 @@ public static function updated($callback)
/**
* Register a creating model event with the dispatcher.
*
* @param \Closure|string $callback
* @param \Illuminate\Events\QueuedClosure|\Closure|string $callback
* @return void
*/
public static function creating($callback)
Expand All @@ -296,7 +296,7 @@ public static function creating($callback)
/**
* Register a created model event with the dispatcher.
*
* @param \Closure|string $callback
* @param \Illuminate\Events\QueuedClosure|\Closure|string $callback
* @return void
*/
public static function created($callback)
Expand All @@ -307,7 +307,7 @@ public static function created($callback)
/**
* Register a replicating model event with the dispatcher.
*
* @param \Closure|string $callback
* @param \Illuminate\Events\QueuedClosure|\Closure|string $callback
* @return void
*/
public static function replicating($callback)
Expand All @@ -318,7 +318,7 @@ public static function replicating($callback)
/**
* Register a deleting model event with the dispatcher.
*
* @param \Closure|string $callback
* @param \Illuminate\Events\QueuedClosure|\Closure|string $callback
* @return void
*/
public static function deleting($callback)
Expand All @@ -329,7 +329,7 @@ public static function deleting($callback)
/**
* Register a deleted model event with the dispatcher.
*
* @param \Closure|string $callback
* @param \Illuminate\Events\QueuedClosure|\Closure|string $callback
* @return void
*/
public static function deleted($callback)
Expand Down

0 comments on commit 75bf358

Please sign in to comment.