Skip to content

Commit a7deb7a

Browse files
OskarStarknicolas-grekas
authored andcommitted
[Notifier] [Bridges] Use CPP
1 parent b9c61b6 commit a7deb7a

File tree

77 files changed

+397
-490
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+397
-490
lines changed

src/Symfony/Component/Notifier/Bridge/AllMySms/AllMySmsTransport.php

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,13 @@ final class AllMySmsTransport extends AbstractTransport
2828
{
2929
protected const HOST = 'api.allmysms.com';
3030

31-
private string $login;
32-
private string $apiKey;
33-
private ?string $from;
34-
35-
public function __construct(string $login, #[\SensitiveParameter] string $apiKey, string $from = null, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
36-
{
37-
$this->login = $login;
38-
$this->apiKey = $apiKey;
39-
$this->from = $from;
40-
31+
public function __construct(
32+
private string $login,
33+
#[\SensitiveParameter] private string $apiKey,
34+
private ?string $from = null,
35+
HttpClientInterface $client = null,
36+
EventDispatcherInterface $dispatcher = null,
37+
) {
4138
parent::__construct($client, $dispatcher);
4239
}
4340

src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsTransport.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
*/
2929
final class AmazonSnsTransport extends AbstractTransport
3030
{
31-
private SnsClient $snsClient;
32-
33-
public function __construct(SnsClient $snsClient, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
34-
{
35-
$this->snsClient = $snsClient;
31+
public function __construct(
32+
private SnsClient $snsClient,
33+
HttpClientInterface $client = null,
34+
EventDispatcherInterface $dispatcher = null,
35+
) {
3636
parent::__construct($client, $dispatcher);
3737
}
3838

src/Symfony/Component/Notifier/Bridge/Bandwidth/BandwidthTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(
3737
private readonly string $applicationId,
3838
private readonly ?string $priority,
3939
HttpClientInterface $client = null,
40-
EventDispatcherInterface $dispatcher = null
40+
EventDispatcherInterface $dispatcher = null,
4141
) {
4242
parent::__construct($client, $dispatcher);
4343
}

src/Symfony/Component/Notifier/Bridge/Bluesky/BlueskyTransport.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ final class BlueskyTransport extends AbstractTransport
3333
private array $authSession = [];
3434

3535
public function __construct(
36-
#[\SensitiveParameter]
37-
private string $user,
38-
#[\SensitiveParameter]
39-
private string $password,
36+
#[\SensitiveParameter] private string $user,
37+
#[\SensitiveParameter] private string $password,
4038
private LoggerInterface $logger,
4139
HttpClientInterface $client = null,
4240
EventDispatcherInterface $dispatcher = null,

src/Symfony/Component/Notifier/Bridge/Brevo/BrevoTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(
3232
#[\SensitiveParameter] private readonly string $apiKey,
3333
private readonly string $sender,
3434
HttpClientInterface $client = null,
35-
EventDispatcherInterface $dispatcher = null
35+
EventDispatcherInterface $dispatcher = null,
3636
) {
3737
parent::__construct($client, $dispatcher);
3838
}

src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkTransport.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,12 @@ class ChatworkTransport extends AbstractTransport
2828
{
2929
protected const HOST = 'api.chatwork.com';
3030

31-
private string $apiToken;
32-
private string $roomId;
33-
34-
public function __construct(#[\SensitiveParameter] string $apiToken, string $roomId, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
35-
{
36-
$this->apiToken = $apiToken;
37-
$this->roomId = $roomId;
31+
public function __construct(
32+
#[\SensitiveParameter] private string $apiToken,
33+
private string $roomId,
34+
HttpClientInterface $client = null,
35+
EventDispatcherInterface $dispatcher = null,
36+
) {
3837
parent::__construct($client, $dispatcher);
3938
}
4039

src/Symfony/Component/Notifier/Bridge/ClickSend/ClickSendTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(
3737
private readonly ?string $listId = null,
3838
private readonly ?string $fromEmail = null,
3939
HttpClientInterface $client = null,
40-
EventDispatcherInterface $dispatcher = null
40+
EventDispatcherInterface $dispatcher = null,
4141
) {
4242
parent::__construct($client, $dispatcher);
4343
}

src/Symfony/Component/Notifier/Bridge/Clickatell/ClickatellTransport.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ final class ClickatellTransport extends AbstractTransport
2828
{
2929
protected const HOST = 'api.clickatell.com';
3030

31-
private string $authToken;
32-
private ?string $from;
33-
34-
public function __construct(#[\SensitiveParameter] string $authToken, string $from = null, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
35-
{
36-
$this->authToken = $authToken;
37-
$this->from = $from;
38-
31+
public function __construct(
32+
#[\SensitiveParameter] private string $authToken,
33+
private ?string $from = null,
34+
HttpClientInterface $client = null,
35+
EventDispatcherInterface $dispatcher = null,
36+
) {
3937
parent::__construct($client, $dispatcher);
4038
}
4139

src/Symfony/Component/Notifier/Bridge/ContactEveryone/ContactEveryoneTransport.php

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,13 @@ final class ContactEveryoneTransport extends AbstractTransport
2929
{
3030
protected const HOST = 'contact-everyone.orange-business.com';
3131

32-
private string $token;
33-
private ?string $diffusionName;
34-
private ?string $category;
35-
36-
public function __construct(#[\SensitiveParameter] string $token, ?string $diffusionName, ?string $category, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
37-
{
38-
$this->token = $token;
39-
$this->diffusionName = $diffusionName;
40-
$this->category = $category;
41-
32+
public function __construct(
33+
#[\SensitiveParameter] private string $token,
34+
private ?string $diffusionName,
35+
private ?string $category,
36+
HttpClientInterface $client = null,
37+
EventDispatcherInterface $dispatcher = null,
38+
) {
4239
parent::__construct($client, $dispatcher);
4340
}
4441

src/Symfony/Component/Notifier/Bridge/Discord/DiscordTransport.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,12 @@ final class DiscordTransport extends AbstractTransport
3131

3232
private const SUBJECT_LIMIT = 2000;
3333

34-
private string $token;
35-
private string $webhookId;
36-
37-
public function __construct(#[\SensitiveParameter] string $token, string $webhookId, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
38-
{
39-
$this->token = $token;
40-
$this->webhookId = $webhookId;
41-
$this->client = $client;
42-
34+
public function __construct(
35+
#[\SensitiveParameter] private string $token,
36+
private string $webhookId,
37+
HttpClientInterface $client = null,
38+
EventDispatcherInterface $dispatcher = null,
39+
) {
4340
parent::__construct($client, $dispatcher);
4441
}
4542

0 commit comments

Comments
 (0)