Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5/** @license For full copyright and license information, please see the LICENSE.md file. */
6
7namespace App\Modules\Tax\Domain\Repository;
8
9defined('AMMONLY_APP') || exit('Direct script access is forbidden.');
10
11use App\Modules\Tax\Domain\Model\TaxRate;
12
13/**
14 * Repository interface for managing TaxRate domain aggregates.
15 */
16interface TaxRateRepositoryInterface
17{
18    /**
19     * Find TaxRate by primary key ID.
20     */
21    public function findById(int $id): ?TaxRate;
22
23    /**
24     * Find TaxRate by unique tax code.
25     */
26    public function findByCode(string $code): ?TaxRate;
27
28    /**
29     * Get default active tax rate for the system.
30     */
31    public function findDefault(): ?TaxRate;
32
33    /**
34     * List all tax rates matching optional filters.
35     *
36     * @param array<string, mixed> $filters
37     * @return TaxRate[]
38     */
39    public function findAll(array $filters = []): array;
40
41    /**
42     * Save (insert or update) a TaxRate aggregate.
43     */
44    public function save(TaxRate $taxRate): TaxRate;
45
46    /**
47     * Delete or soft-delete a TaxRate by ID.
48     */
49    public function delete(int $id): bool;
50}