@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | * @return Message|null |
155 | 155 | */ |
156 | 156 | public function getMessage($uid, $msglist = null) { |
157 | - if(imap_msgno($this->getClient()->getConnection(), $uid) > 0){ |
|
157 | + if (imap_msgno($this->getClient()->getConnection(), $uid) > 0) { |
|
158 | 158 | return new Message($uid, $msglist, $this->getClient()); |
159 | 159 | } |
160 | 160 | |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | |
261 | 261 | $this->getClient()->checkConnection(); |
262 | 262 | |
263 | - if($this->validateWhereStatements($where) === false) { |
|
263 | + if ($this->validateWhereStatements($where) === false) { |
|
264 | 264 | throw new MessageSearchValidationException('Invalid imap search criteria provided'); |
265 | 265 | } |
266 | 266 | |
@@ -269,10 +269,10 @@ discard block |
||
269 | 269 | $messages = MessageCollection::make([]); |
270 | 270 | |
271 | 271 | $query = ''; |
272 | - foreach($where as $statement) { |
|
273 | - if(count($statement) == 1) { |
|
272 | + foreach ($where as $statement) { |
|
273 | + if (count($statement) == 1) { |
|
274 | 274 | $query .= $statement[0]; |
275 | - } else{ |
|
275 | + } else { |
|
276 | 276 | $query .= $statement[0].' "'.$statement[1].'"'; |
277 | 277 | } |
278 | 278 | } |
@@ -309,9 +309,9 @@ discard block |
||
309 | 309 | * https://tools.ietf.org/html/rfc822 |
310 | 310 | */ |
311 | 311 | protected function validateWhereStatements($statements) { |
312 | - foreach($statements as $statement) { |
|
312 | + foreach ($statements as $statement) { |
|
313 | 313 | $criteria = $statement[0]; |
314 | - if(in_array($criteria, [ |
|
314 | + if (in_array($criteria, [ |
|
315 | 315 | 'OR', 'AND', |
316 | 316 | 'ALL', 'ANSWERED', 'BCC', 'BEFORE', 'BODY', 'CC', 'DELETED', 'FLAGGED', 'FROM', 'KEYWORD', |
317 | 317 | 'NEW', 'OLD', 'ON', 'RECENT', 'SEEN', 'SINCE', 'SUBJECT', 'TEXT', 'TO', |
@@ -356,11 +356,11 @@ discard block |
||
356 | 356 | * @param $attributes |
357 | 357 | */ |
358 | 358 | protected function parseAttributes($attributes) { |
359 | - $this->no_inferiors = ($attributes & LATT_NOINFERIORS) ? true : false; |
|
360 | - $this->no_select = ($attributes & LATT_NOSELECT) ? true : false; |
|
361 | - $this->marked = ($attributes & LATT_MARKED) ? true : false; |
|
362 | - $this->referal = ($attributes & LATT_REFERRAL) ? true : false; |
|
363 | - $this->has_children = ($attributes & LATT_HASCHILDREN) ? true : false; |
|
359 | + $this->no_inferiors = ($attributes & LATT_NOINFERIORS) ? true : false; |
|
360 | + $this->no_select = ($attributes & LATT_NOSELECT) ? true : false; |
|
361 | + $this->marked = ($attributes & LATT_MARKED) ? true : false; |
|
362 | + $this->referal = ($attributes & LATT_REFERRAL) ? true : false; |
|
363 | + $this->has_children = ($attributes & LATT_HASCHILDREN) ? true : false; |
|
364 | 364 | } |
365 | 365 | |
366 | 366 | /** |