original_string: protected function validateBasepathStore()
      {
          $field = 'basepath';
  
          if ($this->isExcluded($field) || $this->isError('domain')) {
              return null;
          }
  
          $value = $this->getSubmitted($field);
  
          if ($this->isUpdating() && !isset($value)) {
              $this->unsetSubmitted($field);
              return null;
          }
  
          if ($this->getSubmitted('default')) {
              $this->unsetSubmitted($field);
              return null; // Cannot update basepath of default store
          }
  
          $updating = $this->getUpdating();
  
          if (isset($updating['basepath'])
              && $updating['basepath'] === $value
              && $updating['domain'] === $this->getSubmitted('domain')) {
              return true;
          }
  
          if (preg_match('/^[a-z0-9-]{0,50}$/', $value) !== 1) {
              $this->setErrorInvalid($field, $this->translation->text('Path'));
              return false;
          }
  
          return true;
      }
code: protected function validateBasepathStore()
      {
          $field = 'basepath';
  
          if ($this->isExcluded($field) || $this->isError('domain')) {
              return null;
          }
  
          $value = $this->getSubmitted($field);
  
          if ($this->isUpdating() && !isset($value)) {
              $this->unsetSubmitted($field);
              return null;
          }
  
          if ($this->getSubmitted('default')) {
              $this->unsetSubmitted($field);
              return null; // Cannot update basepath of default store
          }
  
          $updating = $this->getUpdating();
  
          if (isset($updating['basepath'])
              && $updating['basepath'] === $value
              && $updating['domain'] === $this->getSubmitted('domain')) {
              return true;
          }
  
          if (preg_match('/^[a-z0-9-]{0,50}$/', $value) !== 1) {
              $this->setErrorInvalid($field, $this->translation->text('Path'));
              return false;
          }
  
          return true;
      }
code_tokens: protected function validateBasepathStore ( ) { $ field = 'basepath' ; if ( $ this -> isExcluded ( $ field ) || $ this -> isError ( 'domain' ) ) { return null ; } $ value = $ this -> getSubmitted ( $ field ) ; if ( $ this -> isUpdating ( ) && ! isset ( $ value ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; } if ( $ this -> getSubmitted ( 'default' ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; // Cannot update basepath of default store } $ updating = $ this -> getUpdating ( ) ; if ( isset ( $ updating [ 'basepath' ] ) && $ updating [ 'basepath' ] === $ value && $ updating [ 'domain' ] === $ this -> getSubmitted ( 'domain' ) ) { return true ; } if ( preg_match ( '/^[a-z0-9-]{0,50}$/' , $ value ) !== 1 ) { $ this -> setErrorInvalid ( $ field , $ this -> translation -> text ( 'Path' ) ) ; return false ; } return true ; }
docstring: Validates a store base path
  @return boolean|null
docstring_tokens: Validates a store base path