src/SQRT/QueryBuilder/Conditions.php
protected function processPieces($arr, $force_braces = null)
  {
    if (empty($arr)) {
      return '';
    }

    $glue   = ' AND ';
    $braces = $force_braces ?: (bool)$this->not;
    if (!$this->join_by_and) {
      $glue   = ' OR ';
      $braces = true;
    }

    $str = join($glue, $arr);

    return ($this->not ? 'NOT ' : '') . ($braces ? '(' . $str . ')' : $str);
  }
protected function processPieces($arr, $force_braces = null)
  {
    if (empty($arr)) {
      return '';
    }

    $glue   = ' AND ';
    $braces = $force_braces ?: (bool)$this->not;
    if (!$this->join_by_and) {
      $glue   = ' OR ';
      $braces = true;
    }

    $str = join($glue, $arr);

    return ($this->not ? 'NOT ' : '') . ($braces ? '(' . $str . ')' : $str);
  }
Собираем общую строку из отдельных условий