8000 [Notifier] Fixing code review comments · symfony/symfony@08cd6dd · GitHub
[go: up one dir, main page]

Skip to content

Commit 08cd6dd

Browse files
committed
[Notifier] Fixing code review comments
1 parent 917b74c commit 08cd6dd

File tree

4 files changed

+55
-36
lines changed

4 files changed

+55
-36
lines changed

src/Symfony/Component/Notifier/Bridge/Pushover/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ CHANGELOG
44
6.3
55
---
66

7-
* Add the bridge
7+
* Add the bridge

src/Symfony/Component/Notifier/Bridge/Pushover/PushoverOptions.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ public function getRecipientId(): ?string
8686

8787
/**
8888
* @see https://pushover.net/api#identifiers
89+
*
90+
* @return $this
8991
*/
90-
public function device(?string $device): static
92+
public function device(string $device): static
9193
{
9294
$this->options['device'] = $device;
9395

@@ -96,6 +98,8 @@ public function device(?string $device): static
9698

9799
/**
98100
* @see https://pushover.net/api#html
101+
*
102+
* @return $this
99103
*/
100104
public function asHtml(bool $bool): static
101105
{
@@ -106,6 +110,8 @@ public function asHtml(bool $bool): static
106110

107111
/**
108112
* @see https://pushover.net/api#priority
113+
*
114+
* @return $this
109115
*/
110116
public function priority(int $priority): static
111117
{
@@ -120,6 +126,8 @@ public function priority(int $priority): static
120126

121127
/**
122128
* @see https://pushover.net/api#sounds
129+
*
130+
* @return $this
123131
*/
124132
public function sound(string $sound): static
125133
{
@@ -134,6 +142,8 @@ public function sound(string $sound): static
134142

135143
/**
136144
* @see https://pushover.net/api#timestamp
145+
*
146+
* @return $this
137147
*/
138148
public function timestamp(int $timestamp): static
139149
{
@@ -142,6 +152,9 @@ public function timestamp(int $timestamp): static
142152
return $this;
143153
}
144154

155+
/**
156+
* @return $this
157+
*/
145158
public function title(string $title): static
146159
{
147160
$this->options['title'] = $title;
@@ -151,6 +164,9 @@ public function title(string $title): static
151164

152165
/**
153166
* @see https://pushover.net/api#urls
167+
*
168+
*
169+
* @return $this
154170
*/
155171
public function url(string $url): static
156172
{
@@ -161,6 +177,9 @@ public function url(string $url): static
161177

162178
/**
163179
* @see https://pushover.net/api#urls
180+
*
181+
*
182+
* @return $this
164183
*/
165184
public function urlTitle(string $urlTitle): static
166185
{

src/Symfony/Component/Notifier/Bridge/Pushover/PushoverTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected function doSend(MessageInterface $message): SentMessage
7676

7777
$result = $response->toArray(false);
7878

79-
if (empty($result['request'])) {
79+
if (!isset($result['request'])) {
8080
throw new TransportException(sprintf('Unable to send the Pushover push notification: "%s".', $result->getContent(false)), $response);
8181
}
8282

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
{
2-
"name": "symfony/pushover-notifier",
3-
"type": "symfony-notifier-bridge",
4-
"description": "Symfony Pushover Notifier Bridge",
5-
"keywords": [
6-
"pushover",
7-
"notifier"
8-
],
9-
"homepage": "https://symfony.com",
10-
"license": "MIT",
11-
"authors": [
12-
{
13-
"name": "mocodo",
14-
"homepage": "https://github.com/mocodo"
2+
"name": "symfony/pushover-notifier",
3+
"type": "symfony-notifier-bridge",
4+
"description": "Symfony Pushover Notifier Bridge",
5+
"keywords": [
6+
"pushover",
7+
"notifier"
8+
],
9+
"homepage": "https://symfony.com",
10+
"license": "MIT",
11+
"authors": [
12+
{
13+
"name": "mocodo",
14+
"homepage": "https://github.com/mocodo"
15+
},
16+
{
17+
"name": "Symfony Community",
18+
"homepage": "https://symfony.com/contributors"
19+
}
20+
],
21+
"require": {
22+
"php": ">=8.1",
23+
"symfony/http-client": "^5.4|^6.0",
24+
"symfony/notifier": "^6.3"
1525
},
16-
{
17-
"name": "Symfony Community",
18-
"homepage": "https://symfony.com/contributors"
19-
}
20-
],
21-
"require": {
22-
"php": ">=8.1",
23-
"symfony/http-client": "^5.4|^6.0",
24-
"symfony/notifier": "^6.3"
25-
},
26-
"require-dev": {
27-
"symfony/event-dispatcher": "^5.4|^6.0"
28-
},
29-
"autoload": {
30-
"psr-4": {"Symfony\\Component\\Notifier\\Bridge\\Pushover\\": ""},
31-
"exclude-from-classmap": [
32-
"/Tests/"
33-
]
34-
},
35-
"minimum-stability": "dev"
26+
"require-dev": {
27+
"symfony/event-dispatcher": "^5.4|^6.0"
28+
},
29+
"autoload": {
30+
"psr-4": {"Symfony\\Component\\Notifier\\Bridge\\Pushover\\": ""},
31+
"exclude-from-classmap": [
32+
"/Tests/"
33+
]
34+
},
35+
"minimum-stability": "dev"
3636
}

0 commit comments

Comments
 (0)
0