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

PHPMailerOverride   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 1
cbo 1
dl 0
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFullMessageEnvelope() 0 6 1
A getMessageEnvelopeParts() 0 8 2
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