Fixed missing parentheses in ConditionalTypeNode::__toString()

This commit is contained in:
Jaroslav Hanslík 2022-03-29 11:20:11 +02:00 committed by Ondřej Mirtes
parent f109d1d984
commit c1f8095e52

View File

@ -37,7 +37,7 @@ class ConditionalTypeNode implements TypeNode
public function __toString(): string
{
return sprintf(
'%s %s %s ? %s : %s',
'(%s %s %s ? %s : %s)',
$this->subjectType,
$this->negated ? 'is not' : 'is',
$this->targetType,