Quality of life things.
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Build and test / requirements (push) Failing after 3m48s
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Build and test / requirements (push) Failing after 3m48s
This commit is contained in:
@ -35,9 +35,6 @@ class Ntfy implements NotificationInterface
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo The constructor should be private but static code analysis complains.
|
||||
*/
|
||||
public function __construct(private Client $client)
|
||||
{
|
||||
}
|
||||
@ -49,7 +46,7 @@ class Ntfy implements NotificationInterface
|
||||
*/
|
||||
public function setTopic(string $topic): void
|
||||
{
|
||||
if (!strlen($topic) || strlen($topic) > self::TOPIC_MAX_LENGTH) {
|
||||
if (! strlen($topic) || strlen($topic) > self::TOPIC_MAX_LENGTH) {
|
||||
throw new InvalidArgumentException("Invalid topic length");
|
||||
}
|
||||
|
||||
@ -69,11 +66,11 @@ class Ntfy implements NotificationInterface
|
||||
*/
|
||||
public function send(string $title, string $message): void
|
||||
{
|
||||
if (!strlen($title) || strlen($title) > self::TITLE_MAX_LENGTH) {
|
||||
if (! strlen($title) || strlen($title) > self::TITLE_MAX_LENGTH) {
|
||||
throw new InvalidArgumentException("Invalid title length");
|
||||
}
|
||||
|
||||
if (!strlen($message) || strlen($message) > self::MESSAGE_MAX_LENGTH) {
|
||||
if (! strlen($message) || strlen($message) > self::MESSAGE_MAX_LENGTH) {
|
||||
throw new InvalidArgumentException("Invalid message length");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user