Skip to content

Commit 6e4cd21

Browse files
Ocramiusteohhanhui
authored andcommitted
Squashed coalesce operation into one line
Ref: api-platform/core#3402 (comment)
1 parent e0a2491 commit 6e4cd21

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

TypeFactory.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ public function getType(Type $type, string $format = 'json', ?bool $readableLink
6464
{
6565
if ($type->isCollection()) {
6666
$keyType = $type->getCollectionKeyType();
67-
$subType = $type->getCollectionValueType()
68-
?? new Type($type->getBuiltinType(), false, $type->getClassName(), false);
67+
$subType = $type->getCollectionValueType() ?? new Type($type->getBuiltinType(), false, $type->getClassName(), false);
6968

7069
if (null !== $keyType && Type::BUILTIN_TYPE_STRING === $keyType->getBuiltinType()) {
7170
return $this->addNullabilityToTypeDefinition(

0 commit comments

Comments
 (0)