Completed
Push — master ( 0ca02e...f43631 )
by Rudie
02:10
created
src/IMAPTransport.php 2 patches
Doc Comments   +19 added lines patch added patch discarded remove patch
@@ -9,6 +9,12 @@  discard block
 block discarded – undo
9 9
 
10 10
 	protected $resource; // imap_open() resource
11 11
 
12
+	/**
13
+	 * @param string $server
14
+	 * @param string $username
15
+	 * @param string $password
16
+	 * @param string $mailbox
17
+	 */
12 18
 	public function open( $server, $username, $password, $mailbox, array $flags ) {
13 19
 		if ( !empty($flags) ) {
14 20
 			$server .= '/' . implode('/', $flags);
@@ -34,6 +40,9 @@  discard block
 block discarded – undo
34 40
 		return imap_utf8($string);
35 41
 	}
36 42
 
43
+	/**
44
+	 * @param integer $msgNumber
45
+	 */
37 46
 	public function headerinfo( $msgNumber ) {
38 47
 		return $this->iteratorToLowercaseArray(imap_headerinfo($this->resource, $msgNumber));
39 48
 	}
@@ -46,10 +55,17 @@  discard block
 block discarded – undo
46 55
 		return imap_setflag_full($this->resource, $msgNumber, $flag);
47 56
 	}
48 57
 
58
+	/**
59
+	 * @param integer $msgNumber
60
+	 */
49 61
 	public function fetchstructure( $msgNumber ) {
50 62
 		return imap_fetchstructure($this->resource, $msgNumber);
51 63
 	}
52 64
 
65
+	/**
66
+	 * @param integer $msgNumber
67
+	 * @param string $section
68
+	 */
53 69
 	public function fetchbody( $msgNumber, $section ) {
54 70
 		return quoted_printable_decode(imap_fetchbody($this->resource, $msgNumber, $section, FT_PEEK));
55 71
 	}
@@ -58,6 +74,9 @@  discard block
 block discarded – undo
58 74
 		return imap_expunge($this->resource);
59 75
 	}
60 76
 
77
+	/**
78
+	 * @param integer $msgNumber
79
+	 */
61 80
 	public function delete( $msgNumber ) {
62 81
 		return imap_delete($this->resource, $msgNumber);
63 82
 	}
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 	protected function iteratorToLowercaseArray( $iterator ) {
70 70
 		$data = [];
71 71
 		foreach ( $iterator as $name => $value ) {
72
-			$data[ strtolower($name) ] = $value;
72
+			$data[strtolower($name)] = $value;
73 73
 		}
74 74
 
75 75
 		return $data;
Please login to merge, or discard this patch.
src/IMAPMessagePart.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 			foreach ( $parts as $n => $part ) {
34 34
 				$this->parts[] = $this->message()->createMessagePart(
35 35
 					$part,
36
-					array_merge($this->section(), [$n+1])
36
+					array_merge($this->section(), [$n + 1])
37 37
 				);
38 38
 			}
39 39
 		}
Please login to merge, or discard this patch.
src/IMAPMessage.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 		$cb = [$this->mailbox()->imap(), $clear ? 'unflag' : 'flag'];
32 32
 
33 33
 		$feedback = [];
34
-		foreach ( (array)$flags AS $flag ) {
34
+		foreach ( (array) $flags AS $flag ) {
35 35
 			$flag = '\\' . ucfirst($flag);
36 36
 			$feedback[] = call_user_func($cb, $this->msgNumber, $flag);
37 37
 		}
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
 	public function header( $name ) {
72 72
 		$headers = $this->headers();
73
-		return @$headers[ strtolower($name) ];
73
+		return @$headers[strtolower($name)];
74 74
 	}
75 75
 
76 76
 	public function createMessagePart( $structure, $section ) {
@@ -99,10 +99,10 @@  discard block
 block discarded – undo
99 99
 				);
100 100
 			}
101 101
 			else {
102
-				foreach ($structure->parts as $n => $part) {
102
+				foreach ( $structure->parts as $n => $part ) {
103 103
 					$this->parts[] = $this->createMessagePart(
104 104
 						$part,
105
-						[$n+1]
105
+						[$n + 1]
106 106
 					);
107 107
 				}
108 108
 			}
Please login to merge, or discard this patch.
src/IMAPMailbox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
 					}
96 96
 				}
97 97
 
98
-				if ( $options['limit'] && isset($messages[$options['limit']-1]) ) {
98
+				if ( $options['limit'] && isset($messages[$options['limit'] - 1]) ) {
99 99
 					break;
100 100
 				}
101 101
 			}
Please login to merge, or discard this patch.
src/IMAPMessageContent.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 	public function allParts( $withContainers = false ) {
12 12
 		$parts = [];
13
-		$iterate = function($message) use (&$iterate, &$parts, $withContainers) {
13
+		$iterate = function( $message ) use (&$iterate, &$parts, $withContainers) {
14 14
 			foreach ( $message->parts() as $part ) {
15 15
 				if ( $part->parts() ) {
16 16
 					if ( $withContainers ) {
@@ -40,11 +40,11 @@  discard block
 block discarded – undo
40 40
 
41 41
 			$this->parameters['bytes'] = @$structure->bytes;
42 42
 
43
-			foreach ((array) @$structure->parameters as $param) {
44
-				$this->parameters[ strtolower($param->attribute) ] = $param->value;
43
+			foreach ( (array) @$structure->parameters as $param ) {
44
+				$this->parameters[strtolower($param->attribute)] = $param->value;
45 45
 			}
46
-			foreach ((array) @$structure->dparameters as $param) {
47
-				$this->parameters[ strtolower($param->attribute) ] = $param->value;
46
+			foreach ( (array) @$structure->dparameters as $param ) {
47
+				$this->parameters[strtolower($param->attribute)] = $param->value;
48 48
 			}
49 49
 		}
50 50
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
 	public function parameter( $name ) {
55 55
 		$parameters = $this->parameters();
56
-		return @$parameters[ strtolower($name) ];
56
+		return @$parameters[strtolower($name)];
57 57
 	}
58 58
 
59 59
 	public function subtypePart( $subtypes, $recursive ) {
Please login to merge, or discard this patch.