original_string: protected function validateDomainStore()
      {
          $field = 'domain';
  
          if ($this->isExcluded($field)) {
              return null;
          }
  
          $value = $this->getSubmitted($field);
  
          if ($this->isUpdating() && !isset($value)) {
              $this->unsetSubmitted($field);
              return null;
          }
  
          if ($this->getSubmitted('default')) {
              $this->unsetSubmitted('domain'); // Cannot update domain of default store
              return null;
          }
  
          $label = $this->translation->text('Domain');
  
          if (empty($value)) {
              $this->setErrorRequired($field, $label);
          }
  
          $updating = $this->getUpdating();
          if (isset($updating['domain']) && $updating['domain'] === $value) {
              return true;
          }
  
          $existing = $this->store->get($value);
  
          if (!empty($existing)) {
              $this->setErrorExists($field, $label);
              return false;
          }
  
          return true;
      }
code: protected function validateDomainStore()
      {
          $field = 'domain';
  
          if ($this->isExcluded($field)) {
              return null;
          }
  
          $value = $this->getSubmitted($field);
  
          if ($this->isUpdating() && !isset($value)) {
              $this->unsetSubmitted($field);
              return null;
          }
  
          if ($this->getSubmitted('default')) {
              $this->unsetSubmitted('domain'); // Cannot update domain of default store
              return null;
          }
  
          $label = $this->translation->text('Domain');
  
          if (empty($value)) {
              $this->setErrorRequired($field, $label);
          }
  
          $updating = $this->getUpdating();
          if (isset($updating['domain']) && $updating['domain'] === $value) {
              return true;
          }
  
          $existing = $this->store->get($value);
  
          if (!empty($existing)) {
              $this->setErrorExists($field, $label);
              return false;
          }
  
          return true;
      }
code_tokens: protected function validateDomainStore ( ) { $ field = 'domain' ; if ( $ this -> isExcluded ( $ field ) ) { return null ; } $ value = $ this -> getSubmitted ( $ field ) ; if ( $ this -> isUpdating ( ) && ! isset ( $ value ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; } if ( $ this -> getSubmitted ( 'default' ) ) { $ this -> unsetSubmitted ( 'domain' ) ; // Cannot update domain of default store return null ; } $ label = $ this -> translation -> text ( 'Domain' ) ; if ( empty ( $ value ) ) { $ this -> setErrorRequired ( $ field , $ label ) ; } $ updating = $ this -> getUpdating ( ) ; if ( isset ( $ updating [ 'domain' ] ) && $ updating [ 'domain' ] === $ value ) { return true ; } $ existing = $ this -> store -> get ( $ value ) ; if ( ! empty ( $ existing ) ) { $ this -> setErrorExists ( $ field , $ label ) ; return false ; } return true ; }
docstring: Validates a domain
  @return boolean|null
docstring_tokens: Validates a domain