Completed
Pull Request — master (#17)
by Frederik
02:00
created

UnknownUserBackend   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 21
c 0
b 0
f 0
ccs 0
cts 8
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A contains() 0 4 1
A store() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Genkgo\Mail\Protocol\Smtp\Backend;
5
6
use Genkgo\Mail\EmailAddress;
7
use Genkgo\Mail\MessageInterface;
8
use Genkgo\Mail\Protocol\Smtp\BackendInterface;
9
10
final class UnknownUserBackend implements BackendInterface
11
{
12
13
    /**
14
     * @param EmailAddress $mailbox
15
     * @return bool
16
     */
17
    public function contains(EmailAddress $mailbox): bool
18
    {
19
        return false;
20
    }
21
22
    /**
23
     * @param EmailAddress $mailbox
24
     * @param MessageInterface $message
25
     */
26
    public function store(EmailAddress $mailbox, MessageInterface $message): void
27
    {
28
        throw new \InvalidArgumentException('Unknown mailbox');
29
    }
30
}