Skip to content

Commit 2a417cb

Browse files
committed
AC-14557:: False positives in the backward-incompatible changes report (SVC)
1 parent 824170b commit 2a417cb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Analyzer/ClassMethodAnalyzer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,8 @@ private function isReturnsEqualByNullability(ClassMethod $before, ClassMethod $a
465465
*/
466466
private function getDocReturnDeclaration(ClassMethod $method)
467467
{
468-
if (($parsedComment = $method->getAttribute('docCommentParsed'))
468+
if (
469+
($parsedComment = $method->getAttribute('docCommentParsed'))
469470
&& isset($parsedComment['return'])
470471
) {
471472
if ($parsedComment['return'][0] instanceof NullableType) {

src/Comparator/Signature.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ public static function analyze(array $parametersA, array $parametersB): array
147147
if ($parametersA[$i]->type !== null && $parametersB[$i]->type !== null) {
148148
$changes['parameter_typing_changed'] = true;
149149
// Custom: detect nullable added
150-
if ($typeBefore instanceof \PhpParser\Node\NullableType
150+
if (
151+
$typeBefore instanceof \PhpParser\Node\NullableType
151152
&& !$typeAfter instanceof \PhpParser\Node\NullableType
152153
) {
153154
$changes['parameter_nullable_type_added'] = true;

0 commit comments

Comments
 (0)