original_string: public function search()
      {
          $dataProvider = new ActiveDataProvider([
              'query' => static::find()->where(['user_id' => User::loggedId()]),
              'pagination' => [
                  'defaultPageSize' => 10,
                  'forcePageParam' => false
              ],
          ]);
          $dataProvider->sort->defaultOrder = ['post_seen' => SORT_ASC, 'id' => SORT_DESC];
          $dataProvider->pagination->pageSize = Yii::$app->session->get('per-page', 20);
          return $dataProvider;
      }
code: public function search()
      {
          $dataProvider = new ActiveDataProvider([
              'query' => static::find()->where(['user_id' => User::loggedId()]),
              'pagination' => [
                  'defaultPageSize' => 10,
                  'forcePageParam' => false
              ],
          ]);
          $dataProvider->sort->defaultOrder = ['post_seen' => SORT_ASC, 'id' => SORT_DESC];
          $dataProvider->pagination->pageSize = Yii::$app->session->get('per-page', 20);
          return $dataProvider;
      }
code_tokens: public function search ( ) { $ dataProvider = new ActiveDataProvider ( [ 'query' => static :: find ( ) -> where ( [ 'user_id' => User :: loggedId ( ) ] ) , 'pagination' => [ 'defaultPageSize' => 10 , 'forcePageParam' => false ] , ] ) ; $ dataProvider -> sort -> defaultOrder = [ 'post_seen' => SORT_ASC , 'id' => SORT_DESC ] ; $ dataProvider -> pagination -> pageSize = Yii :: $ app -> session -> get ( 'per-page' , 20 ) ; return $ dataProvider ; }
docstring: Searches for subscription
  @return ActiveDataProvider
docstring_tokens: Searches for subscription