UnexpectedCodeException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 19
ccs 0
cts 8
cp 0
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
1
<?php
2
3
namespace Kodus\Mail\SMTP;
4
5
/**
6
 * Exception thrown by the SMTP Client when the server responds with an unexpected status-code.
7
 */
8
class UnexpectedCodeException extends SMTPException
9
{
10
    /**
11
     * @param string $expected_code
12
     * @param string $unexpected_code
13
     * @param string $last_command
14
     * @param string $last_result
15
     */
16
    public function __construct(
17
        string $expected_code,
18
        string $unexpected_code,
19
        string $last_command,
20
        string $last_result
21
    )
22
    {
23
        parent::__construct(
24
            "Unexpected status code: {$unexpected_code} (expected: {$expected_code})\n"
25
            . "S: {$last_command}\n"
26
            . "R: {$last_result}"
27
        );
28
    }
29
}
30