Skip to content

Commit

Permalink
Allow UniqueJobDecorator to be prepended in the asJob arguments
Browse files Browse the repository at this point in the history
See #95
  • Loading branch information
lorisleiva committed Mar 30, 2021
1 parent 9e7e4e7 commit 52c3371
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Decorators/JobDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ protected function getPrependedParameters(string $method): array

if ($firstParameter->allowsNull() && $firstParameterClass === Batch::class) {
return [$this->batch(), ...$this->parameters];
} elseif ($firstParameterClass === static::class) {
} elseif (in_array($firstParameterClass, [static::class, UniqueJobDecorator::class], true)) {
return [$this, ...$this->parameters];
} else {
return $this->parameters;
Expand Down

0 comments on commit 52c3371

Please sign in to comment.