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 86649b7 commit c41e007
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions ChangeLog.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.

## [5.1.1] - 2024-03-02

### Changed

* Do not use implicitly nullable parameters

## [5.1.0] - 2023-12-22

### Added
Expand Down Expand Up @@ -124,6 +130,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt

* This component is no longer supported on PHP 5.6

[5.1.1]: https://github.com/sebastianbergmann/diff/compare/5.1.0...5.1.1
[5.1.0]: https://github.com/sebastianbergmann/diff/compare/5.0.3...5.1.0
[5.0.3]: https://github.com/sebastianbergmann/diff/compare/5.0.2...5.0.3
[5.0.2]: https://github.com/sebastianbergmann/diff/compare/5.0.1...5.0.2
Expand Down
4 changes: 2 additions & 2 deletions src/Differ.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ public function __construct(DiffOutputBuilderInterface $outputBuilder)
$this->outputBuilder = $outputBuilder;
}

public function diff(array|string $from, array|string $to, LongestCommonSubsequenceCalculator $lcs = null): string
public function diff(array|string $from, array|string $to, ?LongestCommonSubsequenceCalculator $lcs = null): string
{
$diff = $this->diffToArray($from, $to, $lcs);

return $this->outputBuilder->getDiff($diff);
}

public function diffToArray(array|string $from, array|string $to, LongestCommonSubsequenceCalculator $lcs = null): array
public function diffToArray(array|string $from, array|string $to, ?LongestCommonSubsequenceCalculator $lcs = null): array
{
if (is_string($from)) {
$from = $this->splitStringByLines($from);
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/ConfigurationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(
string $expected,
$value,
int $code = 0,
Exception $previous = null
?Exception $previous = null
) {
parent::__construct(
sprintf(
Expand Down

0 comments on commit c41e007

Please sign in to comment.