original_string: public function changeStatus(IndexListener $listener, $id)
      {
          $model = $this->repository->find($id);
          if (is_null($model)) {
              return $listener->changeStatusFailed();
          }
          $model->active = $model->active ? 0 : 1;
          $model->save();
          return $listener->changeStatusSuccess();
      }
code: public function changeStatus(IndexListener $listener, $id)
      {
          $model = $this->repository->find($id);
          if (is_null($model)) {
              return $listener->changeStatusFailed();
          }
          $model->active = $model->active ? 0 : 1;
          $model->save();
          return $listener->changeStatusSuccess();
      }
code_tokens: public function changeStatus ( IndexListener $ listener , $ id ) { $ model = $ this -> repository -> find ( $ id ) ; if ( is_null ( $ model ) ) { return $ listener -> changeStatusFailed ( ) ; } $ model -> active = $ model -> active ? 0 : 1 ; $ model -> save ( ) ; return $ listener -> changeStatusSuccess ( ) ; }
docstring: change notification notification status
  
  @param IndexListener $listener
  @param mixed $id
  @return RedirectResponse
docstring_tokens: change notification notification status