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\User\Domain;
11
12use Phexium\Domain\Id\IdInterface;
13use Phexium\Domain\Specification\SpecificationInterface;
14
15interface UserRepository
16{
17    public function findAll(): UsersCollection;
18
19    public function findBy(SpecificationInterface $specification, ?array $orderBy = null, ?int $offset = null, ?int $limit = null): UsersCollection;
20
21    public function findOneBy(SpecificationInterface $specification): ?User;
22
23    public function findById(IdInterface $id): ?User;
24
25    public function getById(IdInterface $id): User;
26
27    public function exists(IdInterface $id): bool;
28
29    public function save(User $user): void;
30
31    public function delete(User $user): int;
32
33    public function deleteById(IdInterface $id): int;
34
35    public function findByEmail(Email $email): ?User;
36}