Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6a18f0a

Browse files
committed
fabbot commits
1 parent 4841698 commit 6a18f0a

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
lines changed

src/Symfony/Component/Notifier/Bridge/RingCentral/RingCentralOptions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* This file is part of the Symfony package.
45
*

src/Symfony/Component/Notifier/Bridge/RingCentral/RingCentralTransport.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* This file is part of the Symfony package.
45
*
@@ -83,7 +84,7 @@ protected function doSend(MessageInterface $message): SentMessage
8384

8485
if (200 !== $statusCode) {
8586
$error = $response->toArray(false);
86-
throw new TransportException(sprintf('Unable to send the SMS - %s', $error['message'] ?? $error['error_description'] ?? $error['description'] ?? 'unknown failure'), $response);
87+
throw new TransportException(sprintf('Unable to send the SMS - "%s".', $error['message'] ?? $error['error_description'] ?? $error['description'] ?? 'unknown failure'), $response);
8788
}
8889

8990
$success = $response->toArray(false);

src/Symfony/Component/Notifier/Bridge/RingCentral/RingCentralTransportFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* This file is part of the Symfony package.
45
*

src/Symfony/Component/Notifier/Bridge/RingCentral/Tests/RingCentralTransportFactoryTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* This file is part of the Symfony package.
45
*

src/Symfony/Component/Notifier/Bridge/RingCentral/Tests/RingCentralTransportTest.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* This file is part of the Symfony package.
45
*
@@ -22,7 +23,8 @@
2223

2324
final class RingCentralTransportTest extends TransportTestCase
2425
{
25-
public function createTransport(HttpClientInterface $client = null, string $from = 'from'): RingCentralTransport {
26+
public function createTransport(HttpClientInterface $client = null, string $from = 'from'): RingCentralTransport
27+
{
2628
return new RingCentralTransport('apiToken', $from, $client ?? $this->createMock(HttpClientInterface::class));
2729
}
2830

@@ -40,7 +42,7 @@ public function supportedMessagesProvider(): iterable
4042
/**
4143
* @dataProvider invalidFromProvider
4244
*/
43-
public function testInvalidArgumentExceptionIsThrownIfFromIsInvalid(string $from): void
45+
public function testInvalidArgumentExceptionIsThrownIfFromIsInvalid(string $from)
4446
{
4547
$transport = $this->createTransport(null, $from);
4648

@@ -53,18 +55,18 @@ public function testInvalidArgumentExceptionIsThrownIfFromIsInvalid(string $from
5355
/**
5456
* @dataProvider validFromProvider
5557
*/
56-
public function testNoInvalidArgumentExceptionIsThrownIfFromIsValid(string $from): void
58+
public function testNoInvalidArgumentExceptionIsThrownIfFromIsValid(string $from)
5759
{
58-
$message = new SmsMessage('+33612345678','Hello!');
60+
$message = new SmsMessage('+33612345678', 'Hello!');
5961
$response = $this->createMock(ResponseInterface::class);
6062
$response->expects(self::exactly(2))->method('getStatusCode')->willReturn(200);
6163
$response->expects(self::once())->method('getContent')->willReturn(json_encode(['id' => 'foo']));
6264
$client = new MockHttpClient(function (string $method, string $url) use ($response): ResponseInterface {
63-
self::assertSame('POST', $method);
64-
self::assertSame('https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/sms', $url);
65+
self::assertSame('POST', $method);
66+
self::assertSame('https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/sms', $url);
6567

66-
return $response;
67-
}
68+
return $response;
69+
}
6870
);
6971
$transport = $this->createTransport($client, $from);
7072
$sentMessage = $transport->send($message);

0 commit comments

Comments
 (0)