diff --git a/src/Logger/ConsoleLogger.php b/src/Logger/ConsoleLogger.php index 3c7fb005f..2231042d6 100644 --- a/src/Logger/ConsoleLogger.php +++ b/src/Logger/ConsoleLogger.php @@ -86,7 +86,7 @@ final class ConsoleLogger extends AbstractLogger LogLevel::NOTICE => 'note', ]; - private \Infection\Console\IO $io; + private IO $io; public function __construct(IO $io) { diff --git a/src/Metrics/MetricsCalculator.php b/src/Metrics/MetricsCalculator.php index 1a5e784d9..00f25375f 100644 --- a/src/Metrics/MetricsCalculator.php +++ b/src/Metrics/MetricsCalculator.php @@ -69,7 +69,7 @@ class MetricsCalculator private int $totalMutantsCount = 0; - private ?\Infection\Metrics\Calculator $calculator = null; + private ?Calculator $calculator = null; public function __construct(int $roundingPrecision) { diff --git a/tests/phpunit/Mutator/Removal/ArrayItemRemovalConfigTest.php b/tests/phpunit/Mutator/Removal/ArrayItemRemovalConfigTest.php index 1bc9f3f0a..6b961bd6b 100644 --- a/tests/phpunit/Mutator/Removal/ArrayItemRemovalConfigTest.php +++ b/tests/phpunit/Mutator/Removal/ArrayItemRemovalConfigTest.php @@ -78,10 +78,11 @@ public function test_the_limit_must_be_an_integer(): void $this->fail(); } catch (TypeError $exception) { - $this->assertSame( - 'Typed property Infection\Mutator\Removal\ArrayItemRemovalConfig::$limit must be int, string used', - $exception->getMessage() - ); + $message = PHP_VERSION_ID < 80000 + ? 'Typed property Infection\Mutator\Removal\ArrayItemRemovalConfig::$limit must be int, string used' + : 'Cannot assign string to property Infection\Mutator\Removal\ArrayItemRemovalConfig::$limit of type int'; + + $this->assertSame($message, $exception->getMessage()); } }