Skip to content

Commit

Permalink
Add "waiting" result status (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
dafeder authored Nov 17, 2023
1 parent 3ac80cf commit f7ce890
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ class Result implements HydratableInterface
{
use HydratableTrait;

public const WAITING = 'waiting';
public const STOPPED = 'stopped';
public const IN_PROGRESS = 'in_progress';
public const ERROR = 'error';
public const DONE = 'done';

private $status = self::STOPPED;
private $status = self::WAITING;
private string $data = "";
private string $error = "";

public function setStatus($status)
{
$statuss = [self::STOPPED, self::IN_PROGRESS, self::ERROR, self::DONE];
$statuss = [self::WAITING, self::STOPPED, self::IN_PROGRESS, self::ERROR, self::DONE];
if (in_array($status, $statuss)) {
$this->status = $status;
} else {
Expand Down

0 comments on commit f7ce890

Please sign in to comment.