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

ParserMessageProxy::setLastLineEndingLength()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 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