Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit 56a837d

Browse files
committed
Apply code optimisation
1 parent fbe3759 commit 56a837d

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/Request/BaseRequest.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,16 @@ abstract class BaseRequest
3333
*/
3434
public function __construct(string $serverKey = null, string $senderId = null)
3535
{
36-
if ($serverKey !== null) {
37-
$this->serverKey = $serverKey;
38-
}
39-
40-
if ($senderId !== null) {
41-
$this->senderId = $senderId;
42-
}
43-
4436
// They may have been already filled
4537
if ($this->serverKey === null || $this->senderId === null) {
4638
$config = app('config')->get('fcm.http', []);
4739
$this->serverKey = $config['server_key'];
4840
$this->senderId = $config['sender_id'];
41+
return;
4942
}
43+
44+
$this->serverKey = $serverKey;
45+
$this->senderId = $senderId;
5046
}
5147

5248
/**

0 commit comments

Comments
 (0)