Test Failed
Push — 2.0 ( 0b4092...91a8b2 )
by Zaahid
04:50
created

ParserMessageProxy   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 2
b 0
f 0
dl 0
loc 18
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
use ZBateson\MailMimeParser\Header\HeaderConsts;
10
11
/**
12
 * A bi-directional parser-to-part proxy for IMessage.
13
 *
14
 * @author Zaahid Bateson
15
 */
16
class ParserMessageProxy extends ParserMimePartProxy
17
{
18
    /**
19
     * @var int maintains the character length of the last line separator,
20
     *      typically 2 for CRLF, to keep track of the correct 'end' position
21
     *      for a part because the CRLF before a boundary is considered part of
22
     *      the boundary.
23
     */
24
    protected $lastLineEndingLength = 0;
25
26
    public function getLastLineEndingLength()
27
    {
28
        return $this->lastLineEndingLength;
29
    }
30
31
    public function setLastLineEndingLength($lastLineEndingLength)
32
    {
33
        $this->lastLineEndingLength = $lastLineEndingLength;
34
    }
35
}
36