Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3// ╔════════════════════════════════════════════════════════════╗
4// ║ MIT Licence (#Expat) - https://opensource.org/licenses/MIT ║
5// ║ Copyright 2026 Frederic Poeydomenge <dyno@phexium.com>     ║
6// ╚════════════════════════════════════════════════════════════╝
7
8declare(strict_types=1);
9
10namespace AppDemo\Loan\Domain;
11
12use Phexium\Domain\Id\IdInterface;
13use Phexium\Domain\Specification\SpecificationInterface;
14
15interface LoanRepository
16{
17    public function findAll(): LoansCollection;
18
19    public function findBy(SpecificationInterface $specification, ?array $orderBy = null, ?int $offset = null, ?int $limit = null): LoansCollection;
20
21    public function findOneBy(SpecificationInterface $specification): ?Loan;
22
23    public function findById(IdInterface $id): ?Loan;
24
25    public function getById(IdInterface $id): Loan;
26
27    public function exists(IdInterface $id): bool;
28
29    public function save(Loan $loan): void;
30
31    public function delete(Loan $loan): int;
32
33    public function deleteById(IdInterface $id): int;
34
35    public function findByUserId(IdInterface $userId): LoansCollection;
36
37    public function findAllWithDetails(): array;
38
39    public function findByUserIdWithBookDetails(IdInterface $userId): array;
40}