Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6af47c2

Browse filesBrowse files
committed
[Notifier][Spot-Hit] Fix review feedbacks
1 parent 5015727 commit 6af47c2
Copy full SHA for 6af47c2

File tree

Expand file treeCollapse file tree

5 files changed

+11
-9
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+11
-9
lines changed

‎src/Symfony/Component/Notifier/Bridge/SpotHit/README.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Notifier/Bridge/SpotHit/README.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Spot-Hit Notifier
22
=================
33

4-
Provides Spot-Hit integration for Symfony Notifier.
4+
Provides [Spot-Hit](https://www.spot-hit.fr/) integration for Symfony Notifier.
55

66
#### DSN example
77

@@ -16,6 +16,7 @@ where:
1616
Resources
1717
---------
1818

19+
* [Spot-Hit API doc](https://www.spot-hit.fr/documentation-api).
1920
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
2021
* [Report issues](https://github.com/symfony/symfony/issues) and
2122
[send Pull Requests](https://github.com/symfony/symfony/pulls)

‎src/Symfony/Component/Notifier/Bridge/SpotHit/SpotHitTransport.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Notifier/Bridge/SpotHit/SpotHitTransport.php
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ final class SpotHitTransport extends AbstractTransport
3434
private $token;
3535
private $from;
3636

37-
public function __construct(string $token, ?string $from = null, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null) {
37+
public function __construct(string $token, ?string $from = null, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
38+
{
3839
$this->token = $token;
3940
$this->from = $from;
4041

@@ -69,7 +70,8 @@ protected function doSend(MessageInterface $message): SentMessage
6970
throw new UnsupportedMessageTypeException(__CLASS__, SmsMessage::class, $message);
7071
}
7172

72-
$response = $this->client->request('POST', 'https://www.'.$this->getEndpoint().'/api/envoyer/sms', [
73+
$endpoint = sprintf('https://www.%s/api/envoyer/sms', $this->getEndpoint());
74+
$response = $this->client->request('POST', $endpoint, [
7375
'body' => [
7476
'key' => $this->token,
7577
'destinataires' => $message->getPhone(),

‎src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportFactoryTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportFactoryTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
final class SpotHitTransportFactoryTest extends TransportFactoryTestCase
1919
{
2020
/**
21-
* @return SpotHitTransportFactory()
21+
* @return SpotHitTransportFactory
2222
*/
2323
public function createFactory(): TransportFactoryInterface
2424
{

‎src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
final class SpotHitTransportTest extends TransportTestCase
2323
{
2424
/**
25-
* @return SpotHitTransport()
25+
* @return SpotHitTransport
2626
*/
2727
public function createTransport(?HttpClientInterface $client = null): TransportInterface
2828
{

‎src/Symfony/Component/Notifier/Bridge/SpotHit/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Component/Notifier/Bridge/SpotHit/composer.json
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "symfony/spot-hit-notifier",
2+
"name": "symfony/spothit-notifier",
33
"type": "symfony-bridge",
4-
"description": "Symfony SpotHit Notifier Bridge",
4+
"description": "Symfony Spot-Hit Notifier Bridge",
55
"keywords": ["sms", "spot-hit", "notifier", "symfony"],
66
"homepage": "https://symfony.com",
77
"license": "MIT",
@@ -22,8 +22,7 @@
2222
"require": {
2323
"php": ">=7.2.5",
2424
"symfony/http-client": "^4.3|^5.1",
25-
"symfony/notifier": "^5.3",
26-
"symfony/event-dispatcher-contracts": "^2"
25+
"symfony/notifier": "^5.3"
2726
},
2827
"autoload": {
2928
"psr-4": { "Symfony\\Component\\Notifier\\Bridge\\SpotHit\\": "" },

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.