Skip to content

Commit 08de488

Browse files
committed
Avoid use of null-coalescing operator for PHP 5.6
1 parent d86998d commit 08de488

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/OutputFormatter.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,11 @@ public function spaceAfterSelectorSeparator()
118118
public function spaceBeforeListArgumentSeparator($sSeparator)
119119
{
120120
$spaceForSeparator = $this->oFormat->getSpaceBeforeListArgumentSeparators();
121+
if (isset($spaceForSeparator[$sSeparator])) {
122+
return $spaceForSeparator[$sSeparator];
123+
}
121124

122-
return $spaceForSeparator[$sSeparator] ?? $this->space('BeforeListArgumentSeparator', $sSeparator);
125+
return $this->space('BeforeListArgumentSeparator', $sSeparator);
123126
}
124127

125128
/**
@@ -130,8 +133,11 @@ public function spaceBeforeListArgumentSeparator($sSeparator)
130133
public function spaceAfterListArgumentSeparator($sSeparator)
131134
{
132135
$spaceForSeparator = $this->oFormat->getSpaceAfterListArgumentSeparators();
136+
if (isset($spaceForSeparator[$sSeparator])) {
137+
return $spaceForSeparator[$sSeparator];
138+
}
133139

134-
return $spaceForSeparator[$sSeparator] ?? $this->space('AfterListArgumentSeparator', $sSeparator);
140+
return $this->space('AfterListArgumentSeparator', $sSeparator);
135141
}
136142

137143
/**

0 commit comments

Comments
 (0)