@@ -135,7 +135,7 @@ public function setConfig(array $config) {
135135 $ defaultAccount = config ('imap.default ' );
136136 $ defaultConfig = config ("imap.accounts. $ defaultAccount " );
137137
138- foreach ($ this ->validConfigKeys as $ key ){
138+ foreach ($ this ->validConfigKeys as $ key ) {
139139 $ this ->$ key = isset ($ config [$ key ]) ? $ config [$ key ] : $ defaultConfig [$ key ];
140140 }
141141
@@ -147,7 +147,7 @@ public function setConfig(array $config) {
147147 *
148148 * @return resource
149149 */
150- public function getConnection (){
150+ public function getConnection () {
151151 return $ this ->connection ;
152152 }
153153
@@ -213,7 +213,7 @@ public function connect($attempts = 3) {
213213 $ attempts ,
214214 config ('imap.options.open ' )
215215 );
216- $ this ->connected = !! $ this ->connection ;
216+ $ this ->connected = !!$ this ->connection ;
217217 } catch (\ErrorException $ e ) {
218218 $ errors = imap_errors ();
219219 $ message = $ e ->getMessage ().'. ' .implode ("; " , (is_array ($ errors ) ? $ errors : array ()));
@@ -232,7 +232,7 @@ public function connect($attempts = 3) {
232232 public function disconnect () {
233233 if ($ this ->isConnected ()) {
234234 $ this ->errors = array_merge ($ this ->errors , imap_errors () ?: []);
235- $ this ->connected = ! imap_close ($ this ->connection , CL_EXPUNGE );
235+ $ this ->connected = !imap_close ($ this ->connection , CL_EXPUNGE );
236236 }
237237
238238 return $ this ;
@@ -249,11 +249,11 @@ public function disconnect() {
249249 *
250250 * @return Folder
251251 */
252- public function getFolder ($ folder_name , $ attributes = 32 , $ delimiter = null ){
252+ public function getFolder ($ folder_name , $ attributes = 32 , $ delimiter = null ) {
253253
254254 $ delimiter = $ delimiter == null ? config ('imap.options.delimiter ' , '/ ' ) : $ delimiter ;
255255
256- $ oFolder = new Folder ($ this , (object )[
256+ $ oFolder = new Folder ($ this , (object ) [
257257 'name ' => $ this ->getAddress ().$ folder_name ,
258258 'attributes ' => $ attributes ,
259259 'delimiter ' => $ delimiter
@@ -320,7 +320,7 @@ public function openFolder(Folder $folder, $attempts = 3) {
320320 *
321321 * @return bool
322322 */
323- public function createFolder ($ name ){
323+ public function createFolder ($ name ) {
324324 return imap_createmailbox ($ this ->connection , imap_utf7_encode ($ name ));
325325 }
326326
@@ -419,7 +419,7 @@ protected function getAddress() {
419419 *
420420 * @return array
421421 */
422- public function getQuota (){
422+ public function getQuota () {
423423 return imap_get_quota ($ this ->connection , 'user. ' .$ this ->username );
424424 }
425425
@@ -430,7 +430,7 @@ public function getQuota(){
430430 *
431431 * @return array
432432 */
433- public function getQuotaRoot ($ quota_root = 'INBOX ' ){
433+ public function getQuotaRoot ($ quota_root = 'INBOX ' ) {
434434 return imap_get_quotaroot ($ this ->connection , $ quota_root );
435435 }
436436
@@ -439,7 +439,7 @@ public function getQuotaRoot($quota_root = 'INBOX'){
439439 *
440440 * @return int
441441 */
442- public function countMessages (){
442+ public function countMessages () {
443443 return imap_num_msg ($ this ->connection );
444444 }
445445
@@ -448,7 +448,7 @@ public function countMessages(){
448448 *
449449 * @return int
450450 */
451- public function countRecentMessages (){
451+ public function countRecentMessages () {
452452 return imap_num_recent ($ this ->connection );
453453 }
454454
@@ -457,7 +457,7 @@ public function countRecentMessages(){
457457 *
458458 * @return array
459459 */
460- public function getAlerts (){
460+ public function getAlerts () {
461461 return imap_alerts ();
462462 }
463463
@@ -466,7 +466,7 @@ public function getAlerts(){
466466 *
467467 * @return array
468468 */
469- public function getErrors (){
469+ public function getErrors () {
470470 $ this ->errors = array_merge ($ this ->errors , imap_errors () ?: []);
471471
472472 return $ this ->errors ;
@@ -477,7 +477,7 @@ public function getErrors(){
477477 *
478478 * @return string
479479 */
480- public function getLastError (){
480+ public function getLastError () {
481481 return imap_last_error ();
482482 }
483483
@@ -486,7 +486,7 @@ public function getLastError(){
486486 *
487487 * @return bool
488488 */
489- public function expunge (){
489+ public function expunge () {
490490 return imap_expunge ($ this ->connection );
491491 }
492492
@@ -501,7 +501,7 @@ public function expunge(){
501501 * Recent [int(0)] number of recent messages in the mailbox
502502 * }
503503 */
504- public function checkCurrentMailbox (){
504+ public function checkCurrentMailbox () {
505505 return imap_check ($ this ->connection );
506506 }
507507}
0 commit comments