Skip to content

Commit 9961afd

Browse files
committed
Fix deprecated code for PHP 8.4
1 parent 382f04a commit 9961afd

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Traits/ContainerTestTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ trait ContainerTestTrait
2727
*
2828
* @return void
2929
*/
30-
protected function setUpContainer(ContainerInterface $container = null): void
30+
protected function setUpContainer(?ContainerInterface $container = null): void
3131
{
3232
if ($container instanceof ContainerInterface) {
3333
$this->container = $container;

src/Traits/MailerTestTrait.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
*/
2626
trait MailerTestTrait
2727
{
28-
protected function assertEmailCount(int $count, string $transport = null, string $message = ''): void
28+
protected function assertEmailCount(int $count, ?string $transport = null, string $message = ''): void
2929
{
3030
$this->assertThat($this->getMessageMailerEvents(), new EmailCount($count, $transport), $message);
3131
}
3232

33-
protected function assertQueuedEmailCount(int $count, string $transport = null, string $message = ''): void
33+
protected function assertQueuedEmailCount(int $count, ?string $transport = null, string $message = ''): void
3434
{
3535
$this->assertThat(
3636
$this->getMessageMailerEvents(),
@@ -120,12 +120,12 @@ protected function assertEmailAddressContains(
120120
*
121121
* @return MessageEvent[]
122122
*/
123-
protected function getMailerEvents(string $transport = null): array
123+
protected function getMailerEvents(?string $transport = null): array
124124
{
125125
return $this->getMessageMailerEvents()->getEvents($transport);
126126
}
127127

128-
protected function getMailerEvent(int $index = 0, string $transport = null): ?MessageEvent
128+
protected function getMailerEvent(int $index = 0, ?string $transport = null): ?MessageEvent
129129
{
130130
return $this->getMailerEvents($transport)[$index] ?? null;
131131
}
@@ -135,17 +135,17 @@ protected function getMailerEvent(int $index = 0, string $transport = null): ?Me
135135
*
136136
* @return RawMessage[]
137137
*/
138-
protected function getMailerMessages(string $transport = null): array
138+
protected function getMailerMessages(?string $transport = null): array
139139
{
140140
return $this->getMessageMailerEvents()->getMessages($transport);
141141
}
142142

143-
protected function findMailerMessage(int $index = 0, string $transport = null): ?RawMessage
143+
protected function findMailerMessage(int $index = 0, ?string $transport = null): ?RawMessage
144144
{
145145
return $this->getMailerMessages($transport)[$index] ?? null;
146146
}
147147

148-
protected function getMailerMessage(int $index = 0, string $transport = null): RawMessage
148+
protected function getMailerMessage(int $index = 0, ?string $transport = null): RawMessage
149149
{
150150
$message = $this->findMailerMessage($index, $transport);
151151

0 commit comments

Comments
 (0)