Skip to content

Commit

Permalink
Cs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelgfeller committed Mar 18, 2024
1 parent afbdde0 commit 26dc647
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Traits/ContainerTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ trait ContainerTestTrait
*
* @return void
*/
protected function setUpContainer(ContainerInterface $container = null): void
protected function setUpContainer(?ContainerInterface $container = null): void
{
if ($container instanceof ContainerInterface) {
$this->container = $container;
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/DatabaseSchemaTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ trait DatabaseSchemaTestTrait
*
* @return void
*/
protected function setUpDatabase(string $schemaFile = null): void
protected function setUpDatabase(?string $schemaFile = null): void
{
if (isset($schemaFile)) {
$this->schemaFile = $schemaFile;
Expand Down
6 changes: 3 additions & 3 deletions src/Traits/DatabaseTableTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected function assertTableRow(
array $expectedRow,
string $table,
int $id,
array $fields = null,
?array $fields = null,
string $message = ''
): void {
$this->assertSame(
Expand All @@ -46,7 +46,7 @@ protected function assertTableRow(
*
* @return array Row
*/
protected function getTableRowById(string $table, int $id, array $fields = null): array
protected function getTableRowById(string $table, int $id, ?array $fields = null): array
{
$sql = sprintf('SELECT * FROM `%s` WHERE `id` = :id', $table);
$statement = $this->createPreparedStatement($sql);
Expand Down Expand Up @@ -80,7 +80,7 @@ protected function assertTableRowEquals(
array $expectedRow,
string $table,
int $id,
array $fields = null,
?array $fields = null,
string $message = ''
): void {
$this->assertEquals(
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/HttpJsonTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ trait HttpJsonTestTrait
*
* @return ServerRequestInterface
*/
protected function createJsonRequest(string $method, $uri, array $data = null): ServerRequestInterface
protected function createJsonRequest(string $method, $uri, ?array $data = null): ServerRequestInterface
{
$request = $this->createRequest($method, $uri);

Expand Down
2 changes: 1 addition & 1 deletion src/Traits/HttpTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected function createRequest(string $method, $uri, array $serverParams = [])
*
* @return ServerRequestInterface The request
*/
protected function createFormRequest(string $method, $uri, array $data = null): ServerRequestInterface
protected function createFormRequest(string $method, $uri, ?array $data = null): ServerRequestInterface
{
$request = $this->createRequest($method, $uri);

Expand Down
14 changes: 7 additions & 7 deletions src/Traits/MailerTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
*/
trait MailerTestTrait
{
protected function assertEmailCount(int $count, string $transport = null, string $message = ''): void
protected function assertEmailCount(int $count, ?string $transport = null, string $message = ''): void
{
$this->assertThat($this->getMessageMailerEvents(), new EmailCount($count, $transport), $message);
}

protected function assertQueuedEmailCount(int $count, string $transport = null, string $message = ''): void
protected function assertQueuedEmailCount(int $count, ?string $transport = null, string $message = ''): void
{
$this->assertThat(
$this->getMessageMailerEvents(),
Expand Down Expand Up @@ -120,12 +120,12 @@ protected function assertEmailAddressContains(
*
* @return MessageEvent[]
*/
protected function getMailerEvents(string $transport = null): array
protected function getMailerEvents(?string $transport = null): array
{
return $this->getMessageMailerEvents()->getEvents($transport);
}

protected function getMailerEvent(int $index = 0, string $transport = null): ?MessageEvent
protected function getMailerEvent(int $index = 0, ?string $transport = null): ?MessageEvent
{
return $this->getMailerEvents($transport)[$index] ?? null;
}
Expand All @@ -135,17 +135,17 @@ protected function getMailerEvent(int $index = 0, string $transport = null): ?Me
*
* @return RawMessage[]
*/
protected function getMailerMessages(string $transport = null): array
protected function getMailerMessages(?string $transport = null): array
{
return $this->getMessageMailerEvents()->getMessages($transport);
}

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

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

Expand Down

0 comments on commit 26dc647

Please sign in to comment.