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
InvitationNotFound
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
 withId
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 App\Trip\Domain\ValueObject\InvitationId;
8use DomainException;
9
10/**
11 * The invitation does not exist, is not addressed to the caller, or is no longer
12 * pending. All collapse to 404 — a stranger must not learn an invitation exists.
13 */
14final class InvitationNotFound extends DomainException
15{
16    public static function withId(InvitationId $id): self
17    {
18        return new self(sprintf('Invitation <%s> was not found.', $id->value()));
19    }
20}