19declare(strict_types=1);
61 throw new \InvalidArgumentException(
63 'The passed status "%s" is not valid, must be of one of: %s',
70 $this->status = $a_value;
95 $value = trim($value);
97 throw new \InvalidArgumentException(
'The message must not exceed 400 characters');
100 $this->message = $value;
108 public function setCode(
string $a_value): void
110 if (!\in_array($a_value, self::getCoreCodes(),
true)) {
111 throw new \InvalidArgumentException(
113 'The passed code "%s" is not valid, must be of one of: %s',
115 implode(
', ', self::getCoreCodes())
120 $this->code = $a_value;
130 $this->duration = number_format($a_value, 3,
'.',
'');
setMessage(string $value)
final const int STATUS_FAIL
final const int STATUS_RESET
setDuration(float $a_value)
final const int STATUS_CRASHED
final const string CODE_SUPPOSED_CRASH
final const string CODE_NO_RESULT
final const int STATUS_NO_ACTION
final const string CODE_MANUAL_RESET
final const int STATUS_OK
final const int STATUS_INVALID_CONFIGURATION
static strLen(string $a_string)