Skip to content

Commit

Permalink
Fix PHP 8.4 deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean85 committed Oct 4, 2024
1 parent 9e6b020 commit 4efc0e0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Coverage/Processor/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class Text extends AbstractText
{
public function __construct(OutputInterface $output, bool $showColors, OutputFile $targetFile = null)
public function __construct(OutputInterface $output, bool $showColors, ?OutputFile $targetFile = null)
{
parent::__construct($output, $showColors, false, $targetFile);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Coverage/Processor/TextSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class TextSummary extends AbstractText
{
public function __construct(OutputInterface $output, bool $showColors, OutputFile $targetFile = null)
public function __construct(OutputInterface $output, bool $showColors, ?OutputFile $targetFile = null)
{
parent::__construct($output, $showColors, true, $targetFile);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Logs/LogParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function testParseHandlesTestToBeRetried(): void
/**
* @param LogData[]|null $logs
*/
private function mockLogFetcher(array $logs = null): LogFetcher
private function mockLogFetcher(?array $logs = null): LogFetcher
{
$logs ??= $this->createLogsForOnePassedTest();
$logLocator = $this->prophesize(LogFetcher::class);
Expand All @@ -95,7 +95,7 @@ private function mockLogFetcher(array $logs = null): LogFetcher
/**
* @param class-string|null $eventToBeDispatched
*/
private function mockEventDispatcher(string $eventToBeDispatched = null): EventDispatcherInterface
private function mockEventDispatcher(?string $eventToBeDispatched = null): EventDispatcherInterface
{
$eventDispatcher = $this->prophesize(EventDispatcherInterface::class);

Expand Down

0 comments on commit 4efc0e0

Please sign in to comment.