8000 [Webhook] Add readonly modifier where this possible · symfony/symfony@bf4ad40 · GitHub
[go: up one dir, main page]

Skip to content

Commit bf4ad40

Browse files
committed
[Webhook] Add readonly modifier where this possible
1 parent 7188432 commit bf4ad40

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/Symfony/Component/Webhook/Controller/WebhookController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ final class WebhookController
3030
{
3131
public function __construct(
3232
/** @var array<string, array{parser: RequestParserInterface, secret: string}> $parsers */
33-
private array $parsers,
34-
private MessageBusInterface $bus,
33+
private readonly array $parsers,
34+
private readonly MessageBusInterface $bus,
3535
) {
3636
}
3737

src/Symfony/Component/Webhook/Server/HeaderSignatureConfigurator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
final class HeaderSignatureConfigurator implements RequestConfiguratorInterface
2424
{
2525
public function __construct(
26-
private string $algo = 'sha256',
27-
private string $signatureHeaderName = 'Webhook-Signature',
26+
private readonly string $algo = 'sha256',
27+
private readonly string $signatureHeaderName = 'Webhook-Signature',
2828
) {
2929
}
3030

src/Symfony/Component/Webhook/Server/HeadersConfigurator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
final class HeadersConfigurator implements RequestConfiguratorInterface
2323
{
2424
public function __construct(
25-
private string $eventHeaderName = 'Webhook-Event',
26-
private string $idHeaderName = 'Webhook-Id',
25+
private readonly string $eventHeaderName = 'Webhook-Event',
26+
private readonly string $idHeaderName = 'Webhook-Id',
2727
) {
2828
}
2929

src/Symfony/Component/Webhook/Subscriber.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
class Subscriber
1515
{
1616
public function __construct(
17-
private string $url,
18-
#[\SensitiveParameter] private string $secret,
17+
private readonly string $url,
18+
#[\SensitiveParameter] private readonly string $secret,
1919
) {
2020
}
2121

0 commit comments

Comments
 (0)
0