original_string: public function newOrder($order)
      {
          $sorter = new Sorter();
          $sorter->target = $this;
          $sorter->order = $order;
          $sorter->query = (new Query())
                              ->from(static::tableName())
                              ->where(['and',
                                  ['!=', 'id', $this->id],
                                  ['category_id' => $this->category_id]
                              ])
                              ->orderBy(['sort' => SORT_ASC, 'id' => SORT_ASC])
                              ->indexBy('id');
          return $sorter->run();
      }
code: public function newOrder($order)
      {
          $sorter = new Sorter();
          $sorter->target = $this;
          $sorter->order = $order;
          $sorter->query = (new Query())
                              ->from(static::tableName())
                              ->where(['and',
                                  ['!=', 'id', $this->id],
                                  ['category_id' => $this->category_id]
                              ])
                              ->orderBy(['sort' => SORT_ASC, 'id' => SORT_ASC])
                              ->indexBy('id');
          return $sorter->run();
      }
code_tokens: public function newOrder ( $ order ) { $ sorter = new Sorter ( ) ; $ sorter -> target = $ this ; $ sorter -> order = $ order ; $ sorter -> query = ( new Query ( ) ) -> from ( static :: tableName ( ) ) -> where ( [ 'and' , [ '!=' , 'id' , $ this -> id ] , [ 'category_id' => $ this -> category_id ] ] ) -> orderBy ( [ 'sort' => SORT_ASC , 'id' => SORT_ASC ] ) -> indexBy ( 'id' ) ; return $ sorter -> run ( ) ; }
docstring: Sets new forums order.
  @param int $order new forum sorting order number
  @return bool
  @since 0.2
docstring_tokens: Sets new forums order .