Support for PHP infection testing
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@ -14,8 +14,9 @@ use InvalidArgumentException;
|
||||
*/
|
||||
class Ntfy implements NotificationInterface
|
||||
{
|
||||
const TOPIC_MAX_LENGTH = 256;
|
||||
const MESSAGE_MAX_LENGTH = 4096;
|
||||
public const TOPIC_MAX_LENGTH = 256;
|
||||
public const TITLE_MAX_LENGTH = 256;
|
||||
public const MESSAGE_MAX_LENGTH = 4096;
|
||||
private string $topic = 'default';
|
||||
|
||||
/**
|
||||
@ -68,7 +69,7 @@ class Ntfy implements NotificationInterface
|
||||
*/
|
||||
public function send(string $title, string $message): void
|
||||
{
|
||||
if (!strlen($title) || strlen($title) > self::TOPIC_MAX_LENGTH) {
|
||||
if (!strlen($title) || strlen($title) > self::TITLE_MAX_LENGTH) {
|
||||
throw new InvalidArgumentException("Invalid title length");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user