Passed
Pull Request — master (#171)
by Zaahid
07:14 queued 03:53
created

ParserMessageProxy   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setLastLineEndingLength() 0 3 1
A getLastLineEndingLength() 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\Proxy;
8
9
/**
10
 * A bi-directional parser-to-part proxy for IMessage objects created by
11
 * MimeParser.
12
 *
13
 * @author Zaahid Bateson
14
 */
15
class ParserMessageProxy extends ParserMimePartProxy
16
{
17
    /**
18
     * @var int maintains the character length of the last line separator,
19
     *      typically 2 for CRLF, to keep track of the correct 'end' position
20
     *      for a part because the CRLF before a boundary is considered part of
21
     *      the boundary.
22
     */
23
    protected $lastLineEndingLength = 0;
24
25 102
    public function getLastLineEndingLength()
26
    {
27 102
        return $this->lastLineEndingLength;
28
    }
29
30 102
    public function setLastLineEndingLength($lastLineEndingLength)
31
    {
32 102
        $this->lastLineEndingLength = $lastLineEndingLength;
33 102
    }
34
}
35