Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
InviteeNotFound
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 withEmail
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace App\Trip\Domain\Exceptions;
6
7use DomainException;
8
9/**
10 * No registered user matches the invited email. Maps to 404. Inviting someone
11 * who has not signed up yet is out of scope (would need a token/email flow).
12 */
13final class InviteeNotFound extends DomainException
14{
15    public static function withEmail(string $email): self
16    {
17        return new self(sprintf('No user found with email <%s>.', $email));
18    }
19}