@@ -20,6 +20,10 @@ discard block |
||
20 | 20 | public $HTMLBody; |
21 | 21 | public $attachments = array(); // typeof Array<IMAPMessageAttachment> |
22 | 22 | |
23 | + /** |
|
24 | + * @param integer $msgNumber |
|
25 | + * @param boolean $unseen |
|
26 | + */ |
|
23 | 27 | public function __construct( IMAPMailbox $mailbox, $msgNumber, $header, $unseen ) { |
24 | 28 | $this->mailbox = $mailbox; |
25 | 29 | $this->msgNumber = $msgNumber; |
@@ -27,6 +31,9 @@ discard block |
||
27 | 31 | $this->unseen = $unseen; |
28 | 32 | } |
29 | 33 | |
34 | + /** |
|
35 | + * @param boolean $clear |
|
36 | + */ |
|
30 | 37 | protected function flags( $flags, $clear ) { |
31 | 38 | $cb = $clear ? 'imap_clearflag_full' : 'imap_setflag_full'; |
32 | 39 | |
@@ -128,6 +135,9 @@ discard block |
||
128 | 135 | return $parts; |
129 | 136 | } |
130 | 137 | |
138 | + /** |
|
139 | + * @param integer $index |
|
140 | + */ |
|
131 | 141 | public function part( $index ) { |
132 | 142 | $parts = $this->parts(); |
133 | 143 | return @$parts[$index]; |
@@ -92,8 +92,7 @@ discard block |
||
92 | 92 | $structure, |
93 | 93 | [1] |
94 | 94 | ); |
95 | - } |
|
96 | - else { |
|
95 | + } else { |
|
97 | 96 | foreach ($structure->parts as $n => $part) { |
98 | 97 | $this->parts[] = new IMAPMessagePart( |
99 | 98 | $this, |
@@ -117,8 +116,7 @@ discard block |
||
117 | 116 | } |
118 | 117 | |
119 | 118 | $iterate($part); |
120 | - } |
|
121 | - else { |
|
119 | + } else { |
|
122 | 120 | $parts[] = $part; |
123 | 121 | } |
124 | 122 | } |
@@ -104,6 +104,9 @@ |
||
104 | 104 | return $this->decode($body); |
105 | 105 | } |
106 | 106 | |
107 | + /** |
|
108 | + * @param string $content |
|
109 | + */ |
|
107 | 110 | public function decode( $content ) { |
108 | 111 | return quoted_printable_decode($content); |
109 | 112 | } |
@@ -52,8 +52,7 @@ |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | $iterate($part); |
55 | - } |
|
56 | - else { |
|
55 | + } else { |
|
57 | 56 | $parts[] = $part; |
58 | 57 | } |
59 | 58 | } |