original_string: protected function validateDbConnectInstall()
      {
          if ($this->isError()) {
              return null;
          }
  
          $field = 'database.connect';
  
          if ($this->isExcluded($field)) {
              return null;
          }
  
          $settings = $this->getSubmitted('database');
          $result = $this->install->connectDb($settings);
  
          if ($result === true) {
              return true;
          }
  
          if (empty($result)) {
              $result = $this->translation->text('Could not connect to database');
          }
  
          $this->setError($field, (string) $result);
          return false;
      }
code: protected function validateDbConnectInstall()
      {
          if ($this->isError()) {
              return null;
          }
  
          $field = 'database.connect';
  
          if ($this->isExcluded($field)) {
              return null;
          }
  
          $settings = $this->getSubmitted('database');
          $result = $this->install->connectDb($settings);
  
          if ($result === true) {
              return true;
          }
  
          if (empty($result)) {
              $result = $this->translation->text('Could not connect to database');
          }
  
          $this->setError($field, (string) $result);
          return false;
      }
code_tokens: protected function validateDbConnectInstall ( ) { if ( $ this -> isError ( ) ) { return null ; } $ field = 'database.connect' ; if ( $ this -> isExcluded ( $ field ) ) { return null ; } $ settings = $ this -> getSubmitted ( 'database' ) ; $ result = $ this -> install -> connectDb ( $ settings ) ; if ( $ result === true ) { return true ; } if ( empty ( $ result ) ) { $ result = $ this -> translation -> text ( 'Could not connect to database' ) ; } $ this -> setError ( $ field , ( string ) $ result ) ; return false ; }
docstring: Validates database connection
  @return boolean
docstring_tokens: Validates database connection