Cleaning up.
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2023-08-15 11:43:12 +00:00
parent 31891f3e53
commit 188a6ad9fa
6 changed files with 40 additions and 32 deletions

View File

@@ -6,6 +6,10 @@ namespace App\Notification;
interface NotificationInterface
{
static function factory(array $config): self;
/**
* @param string[] $config Configuration
*/
public static function factory(array $config): self;
public function send(string $title, string $message): void;
}

View File

@@ -12,7 +12,6 @@ use InvalidArgumentException;
class Ntfy implements NotificationInterface
{
private Client $client;
private string $topic = 'default';
/**
* Initialize with configuration.
@@ -28,9 +27,8 @@ class Ntfy implements NotificationInterface
return $instance;
}
public function __construct(Client $client)
public function __construct(private Client $client)
{
$this->client = $client;
}
public function setTopic(string $topic): void