original_string: protected function buildJoins()
      {
          $builtJoins = [];
          foreach ($this->joins as $type => $joins) {
              if (count($joins) > 0) {
                  foreach ($joins as $join) {
                      if ($type === self::JOIN_INNER) {
                          $builtJoins[] = 'INNER JOIN';
                      } elseif ($type === self::JOIN_LEFT) {
                          $builtJoins[] = 'LEFT JOIN';
                      } elseif ($type === self::JOIN_RIGHT) {
                          $builtJoins[] = 'RIGHT JOIN';
                      } elseif ($type === self::JOIN_FULL) {
                          $builtJoins[] = 'FULL JOIN';
                      }
  
                      $builtJoins[] = $this->quoteIdentifier($join->getJoinTableName()) . ' ON';
  
                      // Use a ConditionSet to build the joins
                      $conditionSet = new Query\Condition\AndSet($this, [$join]);
                      $builtJoins[] = $conditionSet->buildWithoutParentheses();
                  }
              }
          }
  
          return implode(' ', $builtJoins);
      }
code: protected function buildJoins()
      {
          $builtJoins = [];
          foreach ($this->joins as $type => $joins) {
              if (count($joins) > 0) {
                  foreach ($joins as $join) {
                      if ($type === self::JOIN_INNER) {
                          $builtJoins[] = 'INNER JOIN';
                      } elseif ($type === self::JOIN_LEFT) {
                          $builtJoins[] = 'LEFT JOIN';
                      } elseif ($type === self::JOIN_RIGHT) {
                          $builtJoins[] = 'RIGHT JOIN';
                      } elseif ($type === self::JOIN_FULL) {
                          $builtJoins[] = 'FULL JOIN';
                      }
  
                      $builtJoins[] = $this->quoteIdentifier($join->getJoinTableName()) . ' ON';
  
                      // Use a ConditionSet to build the joins
                      $conditionSet = new Query\Condition\AndSet($this, [$join]);
                      $builtJoins[] = $conditionSet->buildWithoutParentheses();
                  }
              }
          }
  
          return implode(' ', $builtJoins);
      }
code_tokens: protected function buildJoins ( ) { $ builtJoins = [ ] ; foreach ( $ this -> joins as $ type => $ joins ) { if ( count ( $ joins ) > 0 ) { foreach ( $ joins as $ join ) { if ( $ type === self :: JOIN_INNER ) { $ builtJoins [ ] = 'INNER JOIN' ; } elseif ( $ type === self :: JOIN_LEFT ) { $ builtJoins [ ] = 'LEFT JOIN' ; } elseif ( $ type === self :: JOIN_RIGHT ) { $ builtJoins [ ] = 'RIGHT JOIN' ; } elseif ( $ type === self :: JOIN_FULL ) { $ builtJoins [ ] = 'FULL JOIN' ; } $ builtJoins [ ] = $ this -> quoteIdentifier ( $ join -> getJoinTableName ( ) ) . ' ON' ; // Use a ConditionSet to build the joins $ conditionSet = new Query \ Condition \ AndSet ( $ this , [ $ join ] ) ; $ builtJoins [ ] = $ conditionSet -> buildWithoutParentheses ( ) ; } } } return implode ( ' ' , $ builtJoins ) ; }
docstring: Build and return the join strings.
  
  @return string
docstring_tokens: Build and return the join strings .