Completed
Push — master ( 74fe50...0f19ea )
by Zaahid
09:04
created

NonMimePart   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 14
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
/**
3
 * This file is part of the ZBateson\MailMimeParser project.
4
 *
5
 * @license http://opensource.org/licenses/bsd-license.php BSD
6
 */
7
namespace ZBateson\MailMimeParser\Message;
8
9
use ZBateson\MailMimeParser\Header\HeaderFactory;
10
use ZBateson\MailMimeParser\Message\Writer\MimePartWriter;
11
12
/**
13
 * Represents part of a non-mime message.  The part could either be a plain text
14
 * part or a uuencoded attachment and could be extended for other pre-mime
15
 * message encoding types.
16
 * 
17
 * This allows clients to handle all messages as mime messages by providing a
18
 * Content-Type header.  NonMimePart returns text/plain.
19
 * 
20
 * @author Zaahid Bateson <[email protected]>
21
 */
22
class NonMimePart extends MimePart
23
{
24
    /**
25
     * Sets up a default Content-Type header of text/plain.
26
     * 
27
     * @param HeaderFactory $headerFactory
28
     * @param MimePartWriter $partWriter
29
     */
30 1
    public function __construct(HeaderFactory $headerFactory, MimePartWriter $partWriter)
31
    {
32 1
        parent::__construct($headerFactory, $partWriter);
33 1
        $this->setRawHeader('Content-Type', 'text/plain');
34 1
    }
35
}
36