original_string: protected function prepareJoins($fromAlias): string
      {
          if (!isset($this->join[$fromAlias])) {
              return '';
          }
  
          $query = '';
  
          foreach ($this->join[$fromAlias] as $join) {
              $query .= ' ' . strtoupper($join['joinType'])
                  . ' JOIN ' . Db::quoteIdentifier($join['joinTable']) . ' AS ' . Db::quoteIdentifier($join['joinAlias'])
                  . ' ON ' . $join['joinCondition'];
              $query .= $this->prepareJoins($join['joinAlias']);
          }
  
          return $query;
      }
code: protected function prepareJoins($fromAlias): string
      {
          if (!isset($this->join[$fromAlias])) {
              return '';
          }
  
          $query = '';
  
          foreach ($this->join[$fromAlias] as $join) {
              $query .= ' ' . strtoupper($join['joinType'])
                  . ' JOIN ' . Db::quoteIdentifier($join['joinTable']) . ' AS ' . Db::quoteIdentifier($join['joinAlias'])
                  . ' ON ' . $join['joinCondition'];
              $query .= $this->prepareJoins($join['joinAlias']);
          }
  
          return $query;
      }
code_tokens: protected function prepareJoins ( $ fromAlias ) : string { if ( ! isset ( $ this -> join [ $ fromAlias ] ) ) { return '' ; } $ query = '' ; foreach ( $ this -> join [ $ fromAlias ] as $ join ) { $ query .= ' ' . strtoupper ( $ join [ 'joinType' ] ) . ' JOIN ' . Db :: quoteIdentifier ( $ join [ 'joinTable' ] ) . ' AS ' . Db :: quoteIdentifier ( $ join [ 'joinAlias' ] ) . ' ON ' . $ join [ 'joinCondition' ] ; $ query .= $ this -> prepareJoins ( $ join [ 'joinAlias' ] ) ; } return $ query ; }
docstring: Generate SQL string for JOINs
  
  @param  string $fromAlias The alias of the table
  
  @return string
docstring_tokens: Generate SQL string for JOINs