<?php

namespace boru\boruai\Openai\Stream;

use boru\boruai\Openai\Stream\Contract\StreamEventListenerInterface;

abstract class AbstractStreamEventListener implements StreamEventListenerInterface
{
    /**
     * Convenience method to compare event type.
     *
     * @param string $actual
     * @param string $expected
     * @return bool
     */
    protected function isType($actual, $expected)
    {
        // All current event types are exact matches; keep simple for now.
        return $actual === $expected;
    }
}
