original_string: protected function addOrderBy()
      {
          if (static::$versionTransformer->isOrdered()) {
              foreach (static::$versionTransformer->getOrderedColumns() as $index => $direction) {
                  if (isset($this->columnNames[$index])) {
                      $this->builder->orderBy(
                          $this->columnNames[$index],
                          $direction
                      );
                  }
              }
          }
      }
code: protected function addOrderBy()
      {
          if (static::$versionTransformer->isOrdered()) {
              foreach (static::$versionTransformer->getOrderedColumns() as $index => $direction) {
                  if (isset($this->columnNames[$index])) {
                      $this->builder->orderBy(
                          $this->columnNames[$index],
                          $direction
                      );
                  }
              }
          }
      }
code_tokens: protected function addOrderBy ( ) { if ( static :: $ versionTransformer -> isOrdered ( ) ) { foreach ( static :: $ versionTransformer -> getOrderedColumns ( ) as $ index => $ direction ) { if ( isset ( $ this -> columnNames [ $ index ] ) ) { $ this -> builder -> orderBy ( $ this -> columnNames [ $ index ] , $ direction ) ; } } } }
docstring: Depending on the sorted column this will add orderBy to the builder.
docstring_tokens: Depending on the sorted column this will add orderBy to the builder .