@@ -154,7 +154,7 @@ public function setChildren($children = []) {
154154 * @return Message|null
155155 */
156156 public function getMessage ($ uid , $ msglist = null ) {
157- if (imap_msgno ($ this ->getClient ()->getConnection (), $ uid ) > 0 ){
157+ if (imap_msgno ($ this ->getClient ()->getConnection (), $ uid ) > 0 ) {
158158 return new Message ($ uid , $ msglist , $ this ->getClient ());
159159 }
160160
@@ -260,7 +260,7 @@ public function searchMessages(array $where, $fetch_options = null, $parse_body
260260
261261 $ this ->getClient ()->checkConnection ();
262262
263- if ($ this ->validateWhereStatements ($ where ) === false ) {
263+ if ($ this ->validateWhereStatements ($ where ) === false ) {
264264 throw new MessageSearchValidationException ('Invalid imap search criteria provided ' );
265265 }
266266
@@ -269,10 +269,10 @@ public function searchMessages(array $where, $fetch_options = null, $parse_body
269269 $ messages = MessageCollection::make ([]);
270270
271271 $ query = '' ;
272- foreach ($ where as $ statement ) {
273- if (count ($ statement ) == 1 ) {
272+ foreach ($ where as $ statement ) {
273+ if (count ($ statement ) == 1 ) {
274274 $ query .= $ statement [0 ];
275- } else {
275+ } else {
276276 $ query .= $ statement [0 ].' " ' .$ statement [1 ].'" ' ;
277277 }
278278 }
@@ -309,9 +309,9 @@ public function searchMessages(array $where, $fetch_options = null, $parse_body
309309 * https://tools.ietf.org/html/rfc822
310310 */
311311 protected function validateWhereStatements ($ statements ) {
312- foreach ($ statements as $ statement ) {
312+ foreach ($ statements as $ statement ) {
313313 $ criteria = $ statement [0 ];
314- if (in_array ($ criteria , [
314+ if (in_array ($ criteria , [
315315 'OR ' , 'AND ' ,
316316 'ALL ' , 'ANSWERED ' , 'BCC ' , 'BEFORE ' , 'BODY ' , 'CC ' , 'DELETED ' , 'FLAGGED ' , 'FROM ' , 'KEYWORD ' ,
317317 'NEW ' , 'OLD ' , 'ON ' , 'RECENT ' , 'SEEN ' , 'SINCE ' , 'SUBJECT ' , 'TEXT ' , 'TO ' ,
@@ -356,11 +356,11 @@ protected function getSimpleName($delimiter, $fullName) {
356356 * @param $attributes
357357 */
358358 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 ;
364364 }
365365
366366 /**
0 commit comments