Conditions | 2 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
19 | public function manifest(ConnectionInterface $connection, Session $session): Session |
||
20 | { |
||
21 | try { |
||
22 | $address = new EmailAddress(substr($session->getCommand(), 11, -1)); |
||
23 | $connection->send('250 OK'); |
||
24 | return (clone $session)->withEnvelope($address); |
||
25 | } catch (\InvalidArgumentException $e) { |
||
26 | $connection->send('501 Invalid envelope'); |
||
27 | return $session; |
||
28 | } |
||
29 | } |
||
30 | |||
38 | } |