honeybadger-io/honeybadger-laravel

View on GitHub
src/Events/DatabaseTransactionRolledBack.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Honeybadger\HoneybadgerLaravel\Events;

use Illuminate\Database\Events\TransactionRolledBack;

class DatabaseTransactionRolledBack extends ApplicationEvent
{
    public string $handles = TransactionRolledBack::class;

    /**
     * @param TransactionRolledBack $event
     * @return EventPayload
     */
    public function getEventPayload($event): EventPayload
    {
        return new EventPayload(
            'query',
            'db.transaction.rolledback',
            'Database transaction rolled back',
            ['connectionName' => $event->connectionName],
        );
    }
}