original_string: public function connectDb(array $settings)
      {
          try {
              $this->db = new Database;
              $this->db->init($settings);
          } catch (Exception $ex) {
              $this->db = null;
              return $this->translation->text($ex->getMessage());
          }
  
          return $this->validateDb();
      }
code: public function connectDb(array $settings)
      {
          try {
              $this->db = new Database;
              $this->db->init($settings);
          } catch (Exception $ex) {
              $this->db = null;
              return $this->translation->text($ex->getMessage());
          }
  
          return $this->validateDb();
      }
code_tokens: public function connectDb ( array $ settings ) { try { $ this -> db = new Database ; $ this -> db -> init ( $ settings ) ; } catch ( Exception $ ex ) { $ this -> db = null ; return $ this -> translation -> text ( $ ex -> getMessage ( ) ) ; } return $ this -> validateDb ( ) ; }
docstring: Tries to connect to the database
  @param array $settings
  @return boolean|string
docstring_tokens: Tries to connect to the database