<?php

declare(strict_types=1);

namespace Apexl\Io\Logger\Hooks;

use Apexl\Io\Interfaces\AbstractHook;
use Apexl\Io\Logger\Whoops\Handlers\IoLoggerHandler;

final readonly class WhoopsHandlerListener implements AbstractHook
{
    public function hooks(): array
    {
        return ['whoopsHandlers'];
    }

    public function __invoke(array $handlers): array
    {
        $handlers[] = new IoLoggerHandler();

        return $handlers;
    }
}
