original_string: protected function implodeClauses(array $clauses)
      {
          $str = '';
          $op = false;
          foreach ($clauses as $clause) {
              // an 'OR' token will change the operator used
              // when concatenating the next clause
              if ($clause == 'OR') {
                  $op = ' OR ';
                  continue;
              }
  
              if ($op && $str) {
                  $str .= $op;
              }
  
              $str .= $clause;
              $op = ' AND ';
          }
  
          return $str;
      }
code: protected function implodeClauses(array $clauses)
      {
          $str = '';
          $op = false;
          foreach ($clauses as $clause) {
              // an 'OR' token will change the operator used
              // when concatenating the next clause
              if ($clause == 'OR') {
                  $op = ' OR ';
                  continue;
              }
  
              if ($op && $str) {
                  $str .= $op;
              }
  
              $str .= $clause;
              $op = ' AND ';
          }
  
          return $str;
      }
code_tokens: protected function implodeClauses ( array $ clauses ) { $ str = '' ; $ op = false ; foreach ( $ clauses as $ clause ) { // an 'OR' token will change the operator used // when concatenating the next clause if ( $ clause == 'OR' ) { $ op = ' OR ' ; continue ; } if ( $ op && $ str ) { $ str .= $ op ; } $ str .= $ clause ; $ op = ' AND ' ; } return $ str ; }
docstring: Implodes a list of WHERE clauses.
  
  @param array $clauses
  
  @return string
docstring_tokens: Implodes a list of WHERE clauses .