Jyxo\Beholder\Result::__construct PHP Method

__construct() public method

Result constructor.
public __construct ( string $status, string $description = '' )
$status string Result status
$description string Status description
    public function __construct(string $status, string $description = '')
    {
        // Checks status
        if (!isset(self::$statusList[$status])) {
            throw new \InvalidArgumentException(sprintf('Invalid status %s', $status));
        }
        $this->status = $status;
        // Sets description
        if (empty($description)) {
            $description = self::$statusList[$status];
        }
        $this->description = $description;
    }