honeybadger-io/honeybadger-laravel

View on GitHub
src/Events/CacheHit.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Honeybadger\HoneybadgerLaravel\Events;

use Illuminate\Cache\Events\CacheHit as LaravelCacheHit;

class CacheHit extends ApplicationEvent
{
    public string $handles = LaravelCacheHit::class;

    /**
     * @param LaravelCacheHit $event
     * @return EventPayload
     */
    public function getEventPayload($event): EventPayload
    {
        return new EventPayload(
            'query',
            'cache.hit',
            'Cache hit',
            ['key' => $event->key],
        );
    }
}