@@ -16,7 +16,7 @@ |
||
16 | 16 | * New custom method which can be called through a mask |
17 | 17 | * @return string |
18 | 18 | */ |
19 | - public function token(){ |
|
19 | + public function token() { |
|
20 | 20 | return implode('-', [$this->id, $this->getMessage()->getUid(), $this->name]); |
21 | 21 | } |
22 | 22 |
@@ -16,7 +16,7 @@ |
||
16 | 16 | * New custom method which can be called through a mask |
17 | 17 | * @return string |
18 | 18 | */ |
19 | - public function my_token(){ |
|
19 | + public function my_token() { |
|
20 | 20 | return implode('-', [$this->message_id, $this->uid, $this->message_no]); |
21 | 21 | } |
22 | 22 |
@@ -30,8 +30,8 @@ |
||
30 | 30 | */ |
31 | 31 | public function boot() { |
32 | 32 | $this->publishes([ |
33 | - __DIR__ . '/../config/imap.php' => config_path('imap.php'), |
|
34 | - ]); |
|
33 | + __DIR__ . '/../config/imap.php' => config_path('imap.php'), |
|
34 | + ]); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function boot() { |
32 | 32 | $this->publishes([ |
33 | - __DIR__ . '/../config/imap.php' => config_path('imap.php'), |
|
33 | + __DIR__.'/../config/imap.php' => config_path('imap.php'), |
|
34 | 34 | ]); |
35 | 35 | } |
36 | 36 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | private function setVendorConfig() { |
62 | 62 | |
63 | 63 | $config_key = 'imap'; |
64 | - $path = __DIR__ . '/../config/' . $config_key . '.php'; |
|
64 | + $path = __DIR__.'/../config/'.$config_key.'.php'; |
|
65 | 65 | |
66 | 66 | $vendor_config = require $path; |
67 | 67 | $config = $this->app['config']->get($config_key, []); |
@@ -114,11 +114,15 @@ discard block |
||
114 | 114 | $arrays = func_get_args(); |
115 | 115 | $base = array_shift($arrays); |
116 | 116 | |
117 | - if (!is_array($base)) $base = empty($base) ? array() : array($base); |
|
117 | + if (!is_array($base)) { |
|
118 | + $base = empty($base) ? array() : array($base); |
|
119 | + } |
|
118 | 120 | |
119 | 121 | foreach ($arrays as $append) { |
120 | 122 | |
121 | - if (!is_array($append)) $append = array($append); |
|
123 | + if (!is_array($append)) { |
|
124 | + $append = array($append); |
|
125 | + } |
|
122 | 126 | |
123 | 127 | foreach ($append as $key => $value) { |
124 | 128 | |
@@ -130,7 +134,9 @@ discard block |
||
130 | 134 | if (is_array($value) or is_array($base[$key])) { |
131 | 135 | $base[$key] = $this->array_merge_recursive_distinct($base[$key], $append[$key]); |
132 | 136 | } else if (is_numeric($key)) { |
133 | - if (!in_array($value, $base)) $base[] = $value; |
|
137 | + if (!in_array($value, $base)) { |
|
138 | + $base[] = $value; |
|
139 | + } |
|
134 | 140 | } else { |
135 | 141 | $base[$key] = $value; |
136 | 142 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * Callback used for the idle command and triggered for every new received message |
54 | 54 | * @param Message $message |
55 | 55 | */ |
56 | - public function onNewMessage(Message $message){ |
|
56 | + public function onNewMessage(Message $message) { |
|
57 | 57 | $this->info("New message received: ".$message->subject); |
58 | 58 | } |
59 | 59 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | public function handle() { |
66 | 66 | if (is_array($this->account)) { |
67 | 67 | $client = ClientFacade::make($this->account); |
68 | - }else{ |
|
68 | + } else { |
|
69 | 69 | $client = ClientFacade::account($this->account); |
70 | 70 | } |
71 | 71 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | try { |
91 | - $folder->idle(function($message){ |
|
91 | + $folder->idle(function($message) { |
|
92 | 92 | $this->onNewMessage($message); |
93 | 93 | }); |
94 | 94 | } catch (\Exception $e) { |
@@ -65,7 +65,7 @@ |
||
65 | 65 | public function handle() { |
66 | 66 | if (is_array($this->account)) { |
67 | 67 | $client = ClientFacade::make($this->account); |
68 | - }else{ |
|
68 | + } else{ |
|
69 | 69 | $client = ClientFacade::account($this->account); |
70 | 70 | } |
71 | 71 |