<?php
declare(strict_types=1);

namespace App\Modules\Accounting;

use App\Core\Contracts\JournalServiceInterface;
use App\Modules\Accounting\Services\JournalService;

final class JournalServiceAdapter implements JournalServiceInterface
{
    public function createEntry(array $header, array $lines, bool $autoPost = false): array
    {
        return JournalService::createEntry($header, $lines, $autoPost);
    }

    public function postEntry(int $entryId): array
    {
        return JournalService::postEntry($entryId);
    }

    public function reverseEntry(int $entryId, string $reason, ?string $reversalDate = null): array
    {
        return JournalService::reverseEntry($entryId, $reason, $reversalDate);
    }
}
