From 6ecc1318759eaaf08a37d07e61b97bc74efbaf52 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Thu, 9 Mar 2023 21:18:04 +0100 Subject: [PATCH] Fix the bug I created, thank you @phpstan ! --- phpstan-baseline.neon | 10 ---------- src/Request/BaseRequest.php | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 2d82f3b26..45db9a57b 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -55,16 +55,6 @@ parameters: count: 1 path: src/Request/BaseRequest.php - - - message: "#^Property LaravelFCM\\\\Request\\\\BaseRequest\\:\\:\\$senderId \\(string\\) does not accept string\\|null\\.$#" - count: 1 - path: src/Request/BaseRequest.php - - - - message: "#^Property LaravelFCM\\\\Request\\\\BaseRequest\\:\\:\\$serverKey \\(string\\) does not accept string\\|null\\.$#" - count: 1 - path: src/Request/BaseRequest.php - - message: "#^Cannot call method get\\(\\) on mixed\\.$#" count: 1 diff --git a/src/Request/BaseRequest.php b/src/Request/BaseRequest.php index c47ddc49e..20f549bf9 100644 --- a/src/Request/BaseRequest.php +++ b/src/Request/BaseRequest.php @@ -34,7 +34,7 @@ abstract class BaseRequest public function __construct(string $serverKey = null, string $senderId = null) { // They may have been already filled - if ($this->serverKey === null || $this->senderId === null) { + if ($serverKey === null || $senderId === null) { $config = app('config')->get('fcm.http', []); $this->serverKey = $config['server_key']; $this->senderId = $config['sender_id'];