public static function makeSingular($operands)
{
if (count($operands) == 1) {
return $operands[0];
}
$result = null;
foreach ($operands as $i => $operand) {
if (is_object($operand)) {
if (!$result) {
$result = $operand;
continue;
}
if ($result instanceof SassString) {
$result = $result->op_concat($operand);
} else {
$result = $result->op_plus($operand);
}
} else {
$string = new SassString(' ');
if (!$result) {
$result = $string;
} else {
$result = $result->op_plus($string);
}
}
}
return $result ? $result : array_shift($operands);
}