feat: distinguish error and info feedbacks
This commit is contained in:
1 parent
1498bdb53b
commit
c8d8c62ff8
3 files changed
+13
-14
No files matched your search
@@ -13,13 +13,8 @@ class Notification
|
||||
public ?int $code;
|
||||
public ?string $message;
|
||||
|
||||
public function isSuccessful(): bool
|
||||
public function isError(): bool
|
||||
{
|
||||
// Successful responses don't carry codes and messages
|
||||
if (null === $this->code && null === $this->message) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return 650 === $this->code && false === stripos($this->message, 'fehler');
|
||||
return 650 !== $this->code;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user