<?php

namespace yiiunit\framework\log\mocks;

use yii\log\Target;

class TargetMock extends Target
{
    public $collectOverride;

    /**
     * @inheritDoc
     */
    public function export(): void
    {
    }

    public function collect($messages, $final): void
    {
        if ($this->collectOverride !== null) {
            call_user_func($this->collectOverride, $messages, $final);
            return;
        }
        parent::collect($messages, $final); // TODO: Change the autogenerated stub
    }
}
