Test Failed
Branch 1.0.0 (84f469)
by Zaahid
05:36
created

NonMimePart::isTextPart()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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\Part;
8
9
/**
10
 * Represents part of a non-mime message.  The part could either be a plain text
11
 * part or a uuencoded attachment and could be extended for other pre-mime
12
 * message encoding types.
13
 * 
14
 * This allows clients to handle all messages as mime messages by providing a
15
 * Content-Type header.  NonMimePart returns text/plain.
16
 * 
17
 * @author Zaahid Bateson
18
 */
19
class NonMimePart extends MessagePart
20
{
21
    /**
22
     * Returns true.
23
     * 
24
     * @return bool
25
     */
26
    public function isTextPart()
27
    {
28
        return true;
29
    }
30
    
31
    /**
32
     * Returns text/plain
33
     * 
34
     * @return string
35
     */
36
    public function getContentType()
37
    {
38
        return 'text/plain';
39
    }
40
    
41
    /**
42
     * Returns US-ASCII
43
     * 
44
     * @return string
45
     */
46
    public function getCharset()
47
    {
48
        return 'US-ASCII';
49
    }
50
    
51
    /**
52
     * Returns 'inline'.
53
     * 
54
     * @return string
55
     */
56
    public function getContentDisposition()
57
    {
58
        return 'inline';
59
    }
60
    
61
    /**
62
     * Returns '7bit'.
63
     * 
64
     * @return string
65
     */
66
    public function getContentTransferEncoding()
67
    {
68
        return '7bit';
69
    }
70
    
71
    /**
72
     * Returns false.
73
     * 
74
     * @return bool
75
     */
76
    public function isMime()
77
    {
78
        return false;
79
    }
80
}
81