diff --git a/ChangeLog-10.1.md b/ChangeLog-10.1.md index b7299e7b4..603efad46 100644 --- a/ChangeLog-10.1.md +++ b/ChangeLog-10.1.md @@ -2,6 +2,12 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [10.1.12] - 2024-03-02 + +### Changed + +* Do not use implicitly nullable parameters + ## [10.1.11] - 2023-12-21 ### Changed @@ -83,6 +89,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * The `SebastianBergmann\CodeCoverage\Filter::includeDirectory()`, `SebastianBergmann\CodeCoverage\Filter::excludeDirectory()`, and `SebastianBergmann\CodeCoverage\Filter::excludeFile()` methods are now deprecated +[10.1.12]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1.11...10.1.12 [10.1.11]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1.10...10.1.11 [10.1.10]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1.9...10.1.10 [10.1.9]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1.8...10.1.9 diff --git a/src/CodeCoverage.php b/src/CodeCoverage.php index 0fe09e277..805fd8223 100644 --- a/src/CodeCoverage.php +++ b/src/CodeCoverage.php @@ -160,7 +160,7 @@ public function setTests(array $tests): void $this->tests = $tests; } - public function start(string $id, TestSize $size = null, bool $clear = false): void + public function start(string $id, ?TestSize $size = null, bool $clear = false): void { if ($clear) { $this->clear(); @@ -177,7 +177,7 @@ public function start(string $id, TestSize $size = null, bool $clear = false): v /** * @psalm-param array> $linesToBeIgnored */ - public function stop(bool $append = true, TestStatus $status = null, array|false $linesToBeCovered = [], array $linesToBeUsed = [], array $linesToBeIgnored = []): RawCodeCoverageData + public function stop(bool $append = true, ?TestStatus $status = null, array|false $linesToBeCovered = [], array $linesToBeUsed = [], array $linesToBeIgnored = []): RawCodeCoverageData { $data = $this->driver->stop(); @@ -202,7 +202,7 @@ public function stop(bool $append = true, TestStatus $status = null, array|false * @throws TestIdMissingException * @throws UnintentionallyCoveredCodeException */ - public function append(RawCodeCoverageData $rawData, string $id = null, bool $append = true, TestStatus $status = null, array|false $linesToBeCovered = [], array $linesToBeUsed = [], array $linesToBeIgnored = []): void + public function append(RawCodeCoverageData $rawData, ?string $id = null, bool $append = true, ?TestStatus $status = null, array|false $linesToBeCovered = [], array $linesToBeUsed = [], array $linesToBeIgnored = []): void { if ($id === null) { $id = $this->currentId; diff --git a/src/Node/AbstractNode.php b/src/Node/AbstractNode.php index 6338ed3d0..3f21a50e7 100644 --- a/src/Node/AbstractNode.php +++ b/src/Node/AbstractNode.php @@ -33,7 +33,7 @@ abstract class AbstractNode implements Countable private readonly ?AbstractNode $parent; private string $id; - public function __construct(string $name, self $parent = null) + public function __construct(string $name, ?self $parent = null) { if (str_ends_with($name, DIRECTORY_SEPARATOR)) { $name = substr($name, 0, -1); diff --git a/src/Version.php b/src/Version.php index c7739dc6e..41f657710 100644 --- a/src/Version.php +++ b/src/Version.php @@ -19,7 +19,7 @@ final class Version public static function id(): string { if (self::$version === '') { - self::$version = (new VersionId('10.1.11', dirname(__DIR__)))->asString(); + self::$version = (new VersionId('10.1.12', dirname(__DIR__)))->asString(); } return self::$version;