<?php
declare(strict_types=1);

namespace App\Repositories;

interface UserRepository
{
    public function find(string $id): ?array;
    public function findByEmail(string $email): ?array;
    public function findByUsername(string $username): ?array;
    public function findByPhone(string $phone): ?array;
    /** Search by any of: first_name, last_name, phone, email, address_line. */
    public function search(string $query, ?string $role = null, int $limit = 25): array;
    public function save(array $user): array;
    public function delete(string $id): void;
    public function all(array $filters = []): array;
}
