Skip to content

Commit

Permalink
fix(Queue): Improve RunJobActionContract $method signature (nullable)
Browse files Browse the repository at this point in the history
  • Loading branch information
pionl committed Feb 28, 2024
1 parent 7e87112 commit e1d93a3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Queue/Contracts/RunJobActionContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ interface RunJobActionContract
*
* @return mixed Returns the result of the job
*/
public function execute(Job $job, ?Command $command = null, string $method = null): mixed;
public function execute(Job $job, ?Command $command = null, ?string $method = null): mixed;
}
2 changes: 1 addition & 1 deletion src/Testing/Queue/Contracts/RunJobActionContractAssert.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(array $execute = [])
$this->setExpectations(RunJobActionContractExpectation::class, $execute);
}

public function execute(Job $job, Command $command = null, string $method = null): mixed
public function execute(Job $job, Command $command = null, ?string $method = null): mixed
{
$_expectation = $this->getExpectation(RunJobActionContractExpectation::class);
$_message = $this->getDebugMessage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
final class RunJobActionContractExpectation
{
/**
* @param Closure(Job, Command, string, self):void|null $_hook
* @param Closure(Job, Command, string|null, self):void|null $_hook
*/
public function __construct(
public readonly mixed $return,
Expand Down

0 comments on commit e1d93a3

Please sign in to comment.