Skip to content

Commit c41e007

Browse files
Do not use implicitly nullable parameters and prepare release
1 parent 86649b7 commit c41e007

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

ChangeLog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
44

5+
## [5.1.1] - 2024-03-02
6+
7+
### Changed
8+
9+
* Do not use implicitly nullable parameters
10+
511
## [5.1.0] - 2023-12-22
612

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

125131
* This component is no longer supported on PHP 5.6
126132

133+
[5.1.1]: https://github.com/sebastianbergmann/diff/compare/5.1.0...5.1.1
127134
[5.1.0]: https://github.com/sebastianbergmann/diff/compare/5.0.3...5.1.0
128135
[5.0.3]: https://github.com/sebastianbergmann/diff/compare/5.0.2...5.0.3
129136
[5.0.2]: https://github.com/sebastianbergmann/diff/compare/5.0.1...5.0.2

src/Differ.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ public function __construct(DiffOutputBuilderInterface $outputBuilder)
4242
$this->outputBuilder = $outputBuilder;
4343
}
4444

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

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

52-
public function diffToArray(array|string $from, array|string $to, LongestCommonSubsequenceCalculator $lcs = null): array
52+
public function diffToArray(array|string $from, array|string $to, ?LongestCommonSubsequenceCalculator $lcs = null): array
5353
{
5454
if (is_string($from)) {
5555
$from = $this->splitStringByLines($from);

src/Exception/ConfigurationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function __construct(
2121
string $expected,
2222
$value,
2323
int $code = 0,
24-
Exception $previous = null
24+
?Exception $previous = null
2525
) {
2626
parent::__construct(
2727
sprintf(

0 commit comments

Comments
 (0)