code: public function completeTransaction(): bool
      {
          if ($this->pdo === null) {
              $this->connect();
          }
  
          if ($this->pdo->inTransaction() === false) {
              return false;
          }
  
          if ($this->hasErrors()) {
              $this->pdo->rollBack();
  
              return false;
          }
  
          $this->pdo->commit();
  
          return true;
      }
docs: @throws DatabaseException
  
  @return bool