src/Selector/Method.php
public function toString()
    {
        $exprString = $this->expr->toString();
        $argsString = implode(', ', StringUtil::formatValues($this->arguments));

        if ($this->expr instanceof AndX || $this->expr instanceof OrX) {
            return $this->methodName.'('.$argsString.'){'.$exprString.'}';
        }

        // Append "functions" with "."
        if (isset($exprString[0]) && ctype_alpha($exprString[0])) {
            return $this->methodName.'('.$argsString.').'.$exprString;
        }

        return $this->methodName.'('.$argsString.')'.$exprString;
    }
public function toString()
    {
        $exprString = $this->expr->toString();
        $argsString = implode(', ', StringUtil::formatValues($this->arguments));

        if ($this->expr instanceof AndX || $this->expr instanceof OrX) {
            return $this->methodName.'('.$argsString.'){'.$exprString.'}';
        }

        // Append "functions" with "."
        if (isset($exprString[0]) && ctype_alpha($exprString[0])) {
            return $this->methodName.'('.$argsString.').'.$exprString;
        }

        return $this->methodName.'('.$argsString.')'.$exprString;
    }
{@inheritdoc}