original_string: protected function checkTransaction() {
          if(null !== $this->con && !$this->con->inTransaction()) {
              $this->con->beginTransaction();
          }
          if(null !== $this->con && $this->con->inTransaction()) {
              $this->items++;
          }
          if($this->items >= Config::getParam('api.block.limit', 1000)) {
              $this->con->commit();
              $this->items = 0;
          }
      }
code: protected function checkTransaction() {
          if(null !== $this->con && !$this->con->inTransaction()) {
              $this->con->beginTransaction();
          }
          if(null !== $this->con && $this->con->inTransaction()) {
              $this->items++;
          }
          if($this->items >= Config::getParam('api.block.limit', 1000)) {
              $this->con->commit();
              $this->items = 0;
          }
      }
code_tokens: protected function checkTransaction ( ) { if ( null !== $ this -> con && ! $ this -> con -> inTransaction ( ) ) { $ this -> con -> beginTransaction ( ) ; } if ( null !== $ this -> con && $ this -> con -> inTransaction ( ) ) { $ this -> items ++ ; } if ( $ this -> items >= Config :: getParam ( 'api.block.limit' , 1000 ) ) { $ this -> con -> commit ( ) ; $ this -> items = 0 ; } }
docstring: Checks if the connection has a transaction initialized
docstring_tokens: Checks if the connection has a transaction initialized