original_string: protected function validateCategory()
      {
          $id = $this->getUpdatingId();
  
          if ($id === false) {
              return null;
          }
  
          $data = $this->category->get($id);
  
          if (empty($data)) {
              $this->setErrorUnavailable('update', $this->translation->text('Category'));
              return false;
          }
  
          $this->setUpdating($data);
          return true;
      }
code: protected function validateCategory()
      {
          $id = $this->getUpdatingId();
  
          if ($id === false) {
              return null;
          }
  
          $data = $this->category->get($id);
  
          if (empty($data)) {
              $this->setErrorUnavailable('update', $this->translation->text('Category'));
              return false;
          }
  
          $this->setUpdating($data);
          return true;
      }
code_tokens: protected function validateCategory ( ) { $ id = $ this -> getUpdatingId ( ) ; if ( $ id === false ) { return null ; } $ data = $ this -> category -> get ( $ id ) ; if ( empty ( $ data ) ) { $ this -> setErrorUnavailable ( 'update' , $ this -> translation -> text ( 'Category' ) ) ; return false ; } $ this -> setUpdating ( $ data ) ; return true ; }
docstring: Validates a category to be updated
  @return boolean|null
docstring_tokens: Validates a category to be updated