original_string: public function collectTransactionEvent($event, $connection)
      {
          $source = [];
  
          if ($this->findSource) {
              try {
                  $source = $this->findSource();
              } catch (\Exception $e) {
              }
          }
  
          $this->queries[] = [
              'query' => $event,
              'type' => 'transaction',
              'bindings' => [],
              'time' => 0,
              'source' => $source,
              'explain' => [],
              'connection' => $connection->getDatabaseName(),
              'hints' => null,
          ];
      }
code: public function collectTransactionEvent($event, $connection)
      {
          $source = [];
  
          if ($this->findSource) {
              try {
                  $source = $this->findSource();
              } catch (\Exception $e) {
              }
          }
  
          $this->queries[] = [
              'query' => $event,
              'type' => 'transaction',
              'bindings' => [],
              'time' => 0,
              'source' => $source,
              'explain' => [],
              'connection' => $connection->getDatabaseName(),
              'hints' => null,
          ];
      }
code_tokens: public function collectTransactionEvent ( $ event , $ connection ) { $ source = [ ] ; if ( $ this -> findSource ) { try { $ source = $ this -> findSource ( ) ; } catch ( \ Exception $ e ) { } } $ this -> queries [ ] = [ 'query' => $ event , 'type' => 'transaction' , 'bindings' => [ ] , 'time' => 0 , 'source' => $ source , 'explain' => [ ] , 'connection' => $ connection -> getDatabaseName ( ) , 'hints' => null , ] ; }
docstring: Collect a database transaction event.
  @param  string $event
  @param \Illuminate\Database\Connection $connection
  @return array
docstring_tokens: Collect a database transaction event .