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 5e238e4 commit 89702be
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions ChangeLog-11.0.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.

## [11.0.1] - 2024-03-02

### Changed

* Do not use implicitly nullable parameters

## [11.0.0] - 2024-02-02

### Removed
Expand All @@ -10,4 +16,5 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt
* This component now requires PHP-Parser 5
* This component is no longer supported on PHP 8.1

[11.0.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/11.0.0...11.0.1
[11.0.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1...11.0.0
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('11.0.0', dirname(__DIR__)))->asString();
self::$version = (new VersionId('11.0.1', dirname(__DIR__)))->asString();
}

return self::$version;
Expand Down

0 comments on commit 89702be

Please sign in to comment.