MontealegreLuis/php-testing-tools

View on GitHub
ewallet/src/Ewallet/Memberships/UnknownMember.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php declare(strict_types=1);
/**
 * PHP version 7.4
 *
 * This source file is subject to the license that is bundled with this package in the file LICENSE.
 */

namespace Ewallet\Memberships;

use Application\DomainException;

/**
 * Exception thrown when a member information cannot be found
 */
final class UnknownMember extends DomainException
{
    public static function identifiedBy(MemberId $memberId): UnknownMember
    {
        return new self("Member with ID '{$memberId->value()}' cannot be found");
    }
}