Passed
Push — master ( 3c92b8...da7b59 )
by Zaahid
08:15 queued 04:35
created

UUEncodedPartHeaderContainer   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 7
c 1
b 0
f 0
dl 0
loc 52
ccs 9
cts 9
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setUnixFileMode() 0 3 1
A setFilename() 0 3 1
A getUnixFileMode() 0 3 1
A getFilename() 0 3 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\Parser\Part;
8
9
use ZBateson\MailMimeParser\Message\PartHeaderContainer;
10
11
/**
12
 * Header container representing the start line of a uu-encoded part.
13
 *
14
 * The line may contain a unix file mode and a filename.
15
 *
16
 * @author Zaahid Bateson
17
 */
18
class UUEncodedPartHeaderContainer extends PartHeaderContainer
19
{
20
    /**
21
     * @var int the unix file permission
22
     */
23
    protected $mode = null;
24
25
    /**
26
     * @var string the name of the file in the uuencoding 'header'.
27
     */
28
    protected $filename = null;
29
30
    /**
31
     * Returns the file mode included in the uuencoded 'begin' line for this
32
     * part.
33
     *
34
     * @return int
35
     */
36 4
    public function getUnixFileMode()
37
    {
38 4
        return $this->mode;
39
    }
40
41
    /**
42
     * Sets the unix file mode for the uuencoded 'begin' line.
43
     *
44
     * @param int $mode
45
     */
46 4
    public function setUnixFileMode($mode)
47
    {
48 4
        $this->mode = $mode;
49 4
    }
50
51
    /**
52
     * Returns the filename included in the uuencoded 'begin' line for this
53
     * part.
54
     *
55
     * @return string
56
     */
57 4
    public function getFilename()
58
    {
59 4
        return $this->filename;
60
    }
61
62
    /**
63
     * Sets the filename included in the uuencoded 'begin' line.
64
     *
65
     * @param string $filename
66
     */
67 4
    public function setFilename($filename)
68
    {
69 4
        $this->filename = $filename;
70 4
    }
71
}
72