PHPstan analysis.
This commit is contained in:
		@@ -3,19 +3,18 @@ namespace App\Ntfy;
 | 
			
		||||
 | 
			
		||||
class Ntfy
 | 
			
		||||
{
 | 
			
		||||
    protected $domain;
 | 
			
		||||
    function __construct($domain)
 | 
			
		||||
    protected string $domain;
 | 
			
		||||
    function __construct(string $domain)
 | 
			
		||||
    {
 | 
			
		||||
        $this->domain = $domain;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    function send($topic,$title, $message)
 | 
			
		||||
    function send(string $topic, string $title, string $message): void
 | 
			
		||||
    {
 | 
			
		||||
        file_get_contents(
 | 
			
		||||
            'https://'.$this->domain.'/'.$topic, false, stream_context_create(
 | 
			
		||||
                ['http' => [
 | 
			
		||||
                'method' => 'POST', 
 | 
			
		||||
                'header' => 'Content-Type: text/plain',
 | 
			
		||||
                'header' =>
 | 
			
		||||
                    "Content-Type: text/plain\r\n" .
 | 
			
		||||
                    "Title: $title\r\n",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user