Skip to content

Commit

Permalink
Do not use implicitly nullable parameters and prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Mar 2, 2024
1 parent 68f0085 commit 842f726
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions ChangeLog-10.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/CodeCoverage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -177,7 +177,7 @@ public function start(string $id, TestSize $size = null, bool $clear = false): v
/**
* @psalm-param array<string,list<int>> $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();

Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Node/AbstractNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 842f726

Please sign in to comment.