diff --git a/src/Coverage/Processor/Text.php b/src/Coverage/Processor/Text.php index 8325addf..c158ee35 100644 --- a/src/Coverage/Processor/Text.php +++ b/src/Coverage/Processor/Text.php @@ -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); } diff --git a/src/Coverage/Processor/TextSummary.php b/src/Coverage/Processor/TextSummary.php index 264cc045..24d7757c 100644 --- a/src/Coverage/Processor/TextSummary.php +++ b/src/Coverage/Processor/TextSummary.php @@ -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); } diff --git a/tests/Unit/Logs/LogParserTest.php b/tests/Unit/Logs/LogParserTest.php index 19b351c2..ee802e96 100644 --- a/tests/Unit/Logs/LogParserTest.php +++ b/tests/Unit/Logs/LogParserTest.php @@ -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); @@ -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);