original_string: protected function validateStore()
      {
          $id = $this->getUpdatingId();
  
          if ($id === false) {
              return null; // Adding a new store
          }
  
          $data = $this->store->get($id);
  
          if (empty($data)) {
              $this->setErrorUnavailable('update', $this->translation->text('Store'));
              return false;
          }
  
          $this->setUpdating($data);
          $this->setSubmitted('default', $this->store->isDefault($data['store_id']));
          return true;
      }
code: protected function validateStore()
      {
          $id = $this->getUpdatingId();
  
          if ($id === false) {
              return null; // Adding a new store
          }
  
          $data = $this->store->get($id);
  
          if (empty($data)) {
              $this->setErrorUnavailable('update', $this->translation->text('Store'));
              return false;
          }
  
          $this->setUpdating($data);
          $this->setSubmitted('default', $this->store->isDefault($data['store_id']));
          return true;
      }
code_tokens: protected function validateStore ( ) { $ id = $ this -> getUpdatingId ( ) ; if ( $ id === false ) { return null ; // Adding a new store } $ data = $ this -> store -> get ( $ id ) ; if ( empty ( $ data ) ) { $ this -> setErrorUnavailable ( 'update' , $ this -> translation -> text ( 'Store' ) ) ; return false ; } $ this -> setUpdating ( $ data ) ; $ this -> setSubmitted ( 'default' , $ this -> store -> isDefault ( $ data [ 'store_id' ] ) ) ; return true ; }
docstring: Validates a store to be updated
  @return boolean|null
docstring_tokens: Validates a store to be updated