Skip to content

Commit

Permalink
docs(Queue): Improve documentation in UsesCommandInterface / trait
Browse files Browse the repository at this point in the history
  • Loading branch information
pionl committed Feb 28, 2024
1 parent 8a973e0 commit 7e87112
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/Queue/Concerns/UsesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

use Illuminate\Console\Command;

/**
* Implementations of UsesCommandInterface. Use this trait to access the command output and other properties. when the
* job is executed by the RunJobActionContract (not in queue).
*
* @see \LaraStrict\Queue\Interfaces\UsesCommandInterface
*/
trait UsesCommand
{
private ?Command $command = null;
Expand Down
8 changes: 6 additions & 2 deletions src/Queue/Interfaces/UsesCommandInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@
use Illuminate\Console\Command;

/**
* Implementations of UsesCommand trait
* Use this interface to access the command output and other properties with combination with UsesCommand trait.
*
* @see \LaraStrict\Queue\Concerns\UsesCommand
* @see \LaraStrict\Queue\Interfaces\UsesCommandInterface
*/
interface UsesCommandInterface
{
/**
* Command is set when the job is executed by the RunJobActionContract (not in queue). You can use this to access
* the command output and other properties.
*/
public function setCommand(Command $command): void;

public function getCommand(): ?Command;
Expand Down

0 comments on commit 7e87112

Please sign in to comment.