Passed
Pull Request — master (#171)
by Zaahid
06:32 queued 03:18
created

ParserUUEncodedPartProxy::getNextPartFilename()   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 0
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 NonMimeParser and IUUEncodedParts.
11
 *
12
 * @author Zaahid Bateson
13
 */
14
class ParserUUEncodedPartProxy extends ParserPartProxy
15
{
16
    /**
17
     * Returns the next part's start position within the message's raw stream,
18
     * or null if not set, not discovered, or there are no more parts under this
19
     * message.
20
     *
21
     * As this is a message-wide setting, ParserUUEncodedPartProxy calls
22
     * getNextPartStart() on its parent (a ParserNonMimeMessageProxy, which
23
     * stores/returns this information).
24
     *
25
     * @return int|null The start position or null
26
     */
27 4
    public function getNextPartStart()
28
    {
29 4
        return $this->getParent()->getNextPartStart();
0 ignored issues
show
Bug introduced by
The method getNextPartStart() does not exist on ZBateson\MailMimeParser\...r\Proxy\ParserPartProxy. It seems like you code against a sub-type of ZBateson\MailMimeParser\...r\Proxy\ParserPartProxy such as ZBateson\MailMimeParser\...arserUUEncodedPartProxy or ZBateson\MailMimeParser\...rserNonMimeMessageProxy. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

29
        return $this->getParent()->/** @scrutinizer ignore-call */ getNextPartStart();
Loading history...
30
    }
31
32
    /**
33
     * Returns the next part's unix file mode in a uu-encoded 'begin' line if
34
     * one exists, or null otherwise.
35
     *
36
     * As this is a message-wide setting, ParserUUEncodedPartProxy calls
37
     * getNextPartMode() on its parent (a ParserNonMimeMessageProxy, which
38
     * stores/returns this information).
39
     *
40
     * @return int|null The file mode or null
41
     */
42 1
    public function getNextPartMode()
43
    {
44 1
        return $this->getParent()->getNextPartMode();
0 ignored issues
show
Bug introduced by
The method getNextPartMode() does not exist on ZBateson\MailMimeParser\...r\Proxy\ParserPartProxy. It seems like you code against a sub-type of ZBateson\MailMimeParser\...r\Proxy\ParserPartProxy such as ZBateson\MailMimeParser\...arserUUEncodedPartProxy or ZBateson\MailMimeParser\...rserNonMimeMessageProxy. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

44
        return $this->getParent()->/** @scrutinizer ignore-call */ getNextPartMode();
Loading history...
45
    }
46
47
    /**
48
     * Returns the next part's filename in a uu-encoded 'begin' line if one
49
     * exists, or null otherwise.
50
     *
51
     * As this is a message-wide setting, ParserUUEncodedPartProxy calls
52
     * getNextPartFilename() on its parent (a ParserNonMimeMessageProxy, which
53
     * stores/returns this information).
54
     *
55
     * @return int|null The file name or null
56
     */
57 1
    public function getNextPartFilename()
58
    {
59 1
        return $this->getParent()->getNextPartFilename();
0 ignored issues
show
Bug introduced by
The method getNextPartFilename() does not exist on ZBateson\MailMimeParser\...r\Proxy\ParserPartProxy. It seems like you code against a sub-type of ZBateson\MailMimeParser\...r\Proxy\ParserPartProxy such as ZBateson\MailMimeParser\...arserUUEncodedPartProxy or ZBateson\MailMimeParser\...rserNonMimeMessageProxy. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

59
        return $this->getParent()->/** @scrutinizer ignore-call */ getNextPartFilename();
Loading history...
60
    }
61
62
    /**
63
     * Sets the next part's start position within the message's raw stream.
64
     *
65
     * As this is a message-wide setting, ParserUUEncodedPartProxy calls
66
     * setNextPartStart() on its parent (a ParserNonMimeMessageProxy, which
67
     * stores/returns this information).
68
     *
69
     * @param int $nextPartStart
70
     */
71 4
    public function setNextPartStart($nextPartStart)
72
    {
73 4
        $this->getParent()->setNextPartStart($nextPartStart);
0 ignored issues
show
Bug introduced by
The method setNextPartStart() does not exist on ZBateson\MailMimeParser\...r\Proxy\ParserPartProxy. It seems like you code against a sub-type of ZBateson\MailMimeParser\...r\Proxy\ParserPartProxy such as ZBateson\MailMimeParser\...arserUUEncodedPartProxy or ZBateson\MailMimeParser\...rserNonMimeMessageProxy. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

73
        $this->getParent()->/** @scrutinizer ignore-call */ setNextPartStart($nextPartStart);
Loading history...
74 4
    }
75
76
    /**
77
     * Sets the next part's unix file mode from its 'begin' line.
78
     *
79
     * As this is a message-wide setting, ParserUUEncodedPartProxy calls
80
     * setNextPartMode() on its parent (a ParserNonMimeMessageProxy, which
81
     * stores/returns this information).
82
     *
83
     * @param int $nextPartMode
84
     */
85 4
    public function setNextPartMode($nextPartMode)
86
    {
87 4
        $this->getParent()->setNextPartMode($nextPartMode);
0 ignored issues
show
Bug introduced by
The method setNextPartMode() does not exist on ZBateson\MailMimeParser\...r\Proxy\ParserPartProxy. It seems like you code against a sub-type of ZBateson\MailMimeParser\...r\Proxy\ParserPartProxy such as ZBateson\MailMimeParser\...arserUUEncodedPartProxy or ZBateson\MailMimeParser\...rserNonMimeMessageProxy. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

87
        $this->getParent()->/** @scrutinizer ignore-call */ setNextPartMode($nextPartMode);
Loading history...
88 4
    }
89
90
    /**
91
     * Sets the next part's filename from its 'begin' line.
92
     *
93
     * As this is a message-wide setting, ParserUUEncodedPartProxy calls
94
     * setNextPartFilename() on its parent (a ParserNonMimeMessageProxy, which
95
     * stores/returns this information).
96
     *
97
     * @param string $nextPartFilename
98
     */
99 4
    public function setNextPartFilename($nextPartFilename)
100
    {
101 4
        $this->getParent()->setNextPartFilename($nextPartFilename);
0 ignored issues
show
Bug introduced by
The method setNextPartFilename() does not exist on ZBateson\MailMimeParser\...r\Proxy\ParserPartProxy. It seems like you code against a sub-type of ZBateson\MailMimeParser\...r\Proxy\ParserPartProxy such as ZBateson\MailMimeParser\...arserUUEncodedPartProxy or ZBateson\MailMimeParser\...rserNonMimeMessageProxy. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

101
        $this->getParent()->/** @scrutinizer ignore-call */ setNextPartFilename($nextPartFilename);
Loading history...
102 4
    }
103
104
    /**
105
     * Returns the file mode included in the uuencoded 'begin' line for this
106
     * part.
107
     *
108
     * @return int
109
     */
110 4
    public function getUnixFileMode()
111
    {
112 4
        return $this->getHeaderContainer()->getUnixFileMode();
0 ignored issues
show
introduced by
The method getUnixFileMode() does not exist on ZBateson\MailMimeParser\...age\PartHeaderContainer. Maybe you want to declare this class abstract? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

112
        return $this->getHeaderContainer()->/** @scrutinizer ignore-call */ getUnixFileMode();
Loading history...
113
    }
114
115
    /**
116
     * Returns the filename included in the uuencoded 'begin' line for this
117
     * part.
118
     *
119
     * @return string
120
     */
121 4
    public function getFilename()
122
    {
123 4
        return $this->getHeaderContainer()->getFilename();
0 ignored issues
show
introduced by
The method getFilename() does not exist on ZBateson\MailMimeParser\...age\PartHeaderContainer. Maybe you want to declare this class abstract? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

123
        return $this->getHeaderContainer()->/** @scrutinizer ignore-call */ getFilename();
Loading history...
124
    }
125
}
126