Skip to content

Commit 8db2bb6

Browse files
committed
fix: styling
1 parent 9670eb2 commit 8db2bb6

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class AccountApproved extends Notification
107107
}
108108
```
109109

110-
This package also supports [Declarative Web Push messages](https://www.w3.org/TR/push-api/#declarative-push-message), which aim to reduce the complexity of using push on the web in general and address some challenges of generic web push notifications like privacy concerns & battery life on mobile by making a client-side service worker optional while remaining fully backwards compatible.
110+
This package also supports [Declarative Web Push messages](https://www.w3.org/TR/push-api/#declarative-push-message), which aim to reduce the complexity of using push on the web in general and address some challenges of generic web push notifications like privacy concerns & battery life on mobile by making a client-side service worker optional while remaining fully backwards compatible:
111111

112112
```php
113113
use Illuminate\Notifications\Notification;

src/DeclarativeWebPushMessage.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public function requireInteraction(bool $value = true): static
200200
/**
201201
* @return $this
202202
*/
203-
public function silent(bool $value = true): static
203+
public function silent(bool $value = true): static
204204
{
205205
$this->silent = $value;
206206

@@ -288,8 +288,10 @@ public function getOptions(): array
288288
*/
289289
public function toArray(): array
290290
{
291-
if (empty($this->title)) throw MessageValidationFailed::titleRequired();
292-
if (empty($this->navigate)) throw MessageValidationFailed::navigateRequired();
291+
if (empty($this->title))
292+
throw MessageValidationFailed::titleRequired();
293+
if (empty($this->navigate))
294+
throw MessageValidationFailed::navigateRequired();
293295

294296
return Arr::whereNotNull([
295297
'web_push' => 8030,

src/Exceptions/MessageValidationFailed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Exception;
66

7-
class MessageValidationFailed extends \Exception
7+
class MessageValidationFailed extends \Exception
88
{
99
public static function titleRequired(): static
1010
{

tests/DeclarativeMessageTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function title_must_be_set(): void
3636
$this->expectException(MessageValidationFailed::class);
3737

3838
$this->expectExceptionMessage('title');
39-
39+
4040
$this->message->toArray();
4141
}
4242

@@ -58,7 +58,7 @@ public function navigate_must_be_set(): void
5858
$this->expectException(MessageValidationFailed::class);
5959

6060
$this->expectExceptionMessage('navigate');
61-
61+
6262
$this->message->toArray();
6363
}
6464

@@ -170,7 +170,7 @@ public function tag_can_be_set(): void
170170
$this->assertEquals('tag1', $this->message->toArray()['notification']['tag']);
171171
}
172172

173-
#[Test]
173+
#[Test]
174174
public function timestamp_can_be_set(): void
175175
{
176176
$this->message->timestamp(1763059844);

0 commit comments

Comments
 (0)