mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
31 lines
554 B
PHP
31 lines
554 B
PHP
<?php
|
|
|
|
namespace App\Classes\ValueObjects\Response;
|
|
|
|
class RuleEvaluationResult
|
|
{
|
|
public bool $success = true;
|
|
public array $messages = [];
|
|
|
|
public function __construct(bool $success = true, array $messages = [])
|
|
{
|
|
$this->success = $success;
|
|
$this->messages = $messages;
|
|
}
|
|
|
|
public function failed(): bool
|
|
{
|
|
return ! $this->success;
|
|
}
|
|
|
|
public function passed(): bool
|
|
{
|
|
return $this->success;
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return $this->messages;
|
|
}
|
|
}
|