Completed
Push — master ( 2bee40...1e6e9e )
by Joao
02:19
created

PHPMailerOverride::getMessageEnvelopeParts()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 2
eloc 4
nc 2
nop 0
1
<?php
2
3
namespace ByJG\Mail\Override;
4
5
class PHPMailerOverride extends \PHPMailer
6
{
7
    public function getFullMessageEnvelope()
8
    {
9
        $parts = $this->getMessageEnvelopeParts();
10
11
        return $parts['header'] . $parts['body'];
12
    }
13
14
    public function getMessageEnvelopeParts()
15
    {
16
        if (!$this->preSend()) {
17
            throw new \Exception('Invalid Format Message');
18
        }
19
20
        return ["header" => $this->MIMEHeader, "body" => $this->MIMEBody];
21
    }
22
}
23