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