original_string: public function describeColumns($conn, $table, $schema = null)
      {
          $dialect = $this->getDialect($conn);
          if (method_exists($dialect, 'showFullColumns')) {
              $sql = $this->getDialect($conn)->showFullColumns($table, $schema);
              $comments = [];
              foreach ($conn->fetchAll($sql, Db::FETCH_ASSOC) as $row) {
                  $comments[$row['Field']] = $row['Comment'];
              }
              $columns = [];
              foreach ($conn->describeColumns($table, $schema) as $col) {
                  $column = Column::copy($col);
                  if (!empty($comments[$col->getName()])) {
                      $column->setComment($comments[$col->getName()]);
                  }
                  $columns[] = $column;
              }
              return $columns;
          } else {
              return $conn->describeColumns($table, $schema);
          }
      }
code: public function describeColumns($conn, $table, $schema = null)
      {
          $dialect = $this->getDialect($conn);
          if (method_exists($dialect, 'showFullColumns')) {
              $sql = $this->getDialect($conn)->showFullColumns($table, $schema);
              $comments = [];
              foreach ($conn->fetchAll($sql, Db::FETCH_ASSOC) as $row) {
                  $comments[$row['Field']] = $row['Comment'];
              }
              $columns = [];
              foreach ($conn->describeColumns($table, $schema) as $col) {
                  $column = Column::copy($col);
                  if (!empty($comments[$col->getName()])) {
                      $column->setComment($comments[$col->getName()]);
                  }
                  $columns[] = $column;
              }
              return $columns;
          } else {
              return $conn->describeColumns($table, $schema);
          }
      }
code_tokens: public function describeColumns ( $ conn , $ table , $ schema = null ) { $ dialect = $ this -> getDialect ( $ conn ) ; if ( method_exists ( $ dialect , 'showFullColumns' ) ) { $ sql = $ this -> getDialect ( $ conn ) -> showFullColumns ( $ table , $ schema ) ; $ comments = [ ] ; foreach ( $ conn -> fetchAll ( $ sql , Db :: FETCH_ASSOC ) as $ row ) { $ comments [ $ row [ 'Field' ] ] = $ row [ 'Comment' ] ; } $ columns = [ ] ; foreach ( $ conn -> describeColumns ( $ table , $ schema ) as $ col ) { $ column = Column :: copy ( $ col ) ; if ( ! empty ( $ comments [ $ col -> getName ( ) ] ) ) { $ column -> setComment ( $ comments [ $ col -> getName ( ) ] ) ; } $ columns [ ] = $ column ; } return $ columns ; } else { return $ conn -> describeColumns ( $ table , $ schema ) ; } }
docstring: Adds comment to column
  
  @param DbAdapter $conn
  @param string $table
  @param string $schema
  @return Column[]
docstring_tokens: Adds comment to column