Skip to content

Commit 17aeaa0

Browse files
committed
No null coalesce
1 parent badbbd6 commit 17aeaa0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Reflection/BetterReflection/BetterReflectionProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ private function getCustomFunction(string $functionName): PhpFunctionReflection
311311
$phpDocThrowsTag = null;
312312

313313
$deprecation = $this->deprecationResolver->getFunctionDeprecation($reflectionFunction);
314-
$deprecationDescription = $deprecation?->getDescription();
314+
$deprecationDescription = $deprecation === null ? null : $deprecation->getDescription();
315315
$isDeprecated = $deprecation !== null;
316316

317317
$isInternal = false;
@@ -418,7 +418,7 @@ public function getConstant(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAn
418418

419419
$deprecation = $this->deprecationResolver->getConstantDeprecation($constantReflection);
420420
$isDeprecated = $deprecation !== null;
421-
$deprecatedDescription = $deprecation?->getDescription();
421+
$deprecatedDescription = $deprecation === null ? null : $deprecation->getDescription();
422422

423423
if ($isDeprecated === false && $docComment !== null) {
424424
$resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($fileName, null, null, null, $docComment);

src/Reflection/ClassReflection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ public function getConstant(string $name): ClassConstantReflection
10821082
}
10831083

10841084
$deprecation = $this->deprecationResolver->getClassConstantDeprecation($reflectionConstant);
1085-
$deprecatedDescription = $deprecation?->getDescription();
1085+
$deprecatedDescription = $deprecation === null ? null : $deprecation->getDescription();
10861086
$isDeprecated = $deprecation !== null;
10871087

10881088
$declaringClass = $this->reflectionProvider->getClass($reflectionConstant->getDeclaringClass()->getName());

src/Reflection/Php/PhpClassReflectionExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ private function createProperty(
223223
}
224224

225225
$deprecation = $this->deprecationResolver->getPropertyDeprecation($propertyReflection);
226-
$deprecatedDescription = $deprecation?->getDescription();
226+
$deprecatedDescription = $deprecation === null ? null : $deprecation->getDescription();
227227
$isDeprecated = $deprecation !== null;
228228
$isInternal = false;
229229
$isReadOnlyByPhpDoc = $classReflection->isImmutable();
@@ -706,7 +706,7 @@ private function createMethod(
706706
public function createUserlandMethodReflection(ClassReflection $fileDeclaringClass, ClassReflection $actualDeclaringClass, ReflectionMethod $methodReflection, ?string $declaringTraitName): PhpMethodReflection
707707
{
708708
$deprecation = $this->deprecationResolver->getMethodDeprecation($methodReflection);
709-
$deprecatedDescription = $deprecation?->getDescription();
709+
$deprecatedDescription = $deprecation === null ? null : $deprecation->getDescription();
710710
$isDeprecated = $deprecation !== null;
711711

712712
$resolvedPhpDoc = null;

0 commit comments

Comments
 (0)