Passed
Push — master ( 45270d...5ca52a )
by Malte
03:12 queued 10s
created
examples/custom_message_mask.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
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->message_id, $this->uid, $this->message_no]);
21 21
     }
22 22
 
Please login to merge, or discard this patch.
examples/custom_attachment_mask.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Support/PaginatedCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      * @return int|null
70 70
      */
71 71
     public function total($total = null) {
72
-        if($total === null) {
72
+        if ($total === null) {
73 73
             return $this->total;
74 74
         }
75 75
 
Please login to merge, or discard this patch.
src/Traits/HasEvents.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
      *
66 66
      * @return array
67 67
      */
68
-    public function getEvents(){
68
+    public function getEvents() {
69 69
         return $this->events;
70 70
     }
71 71
 
Please login to merge, or discard this patch.
src/ClientManager.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -68,17 +68,17 @@  discard block
 block discarded – undo
68 68
     public static function get($key, $default = null) {
69 69
         $parts = explode('.', $key);
70 70
         $value = null;
71
-        foreach($parts as $part) {
72
-            if($value === null) {
73
-                if(isset(self::$config[$part])) {
71
+        foreach ($parts as $part) {
72
+            if ($value === null) {
73
+                if (isset(self::$config[$part])) {
74 74
                     $value = self::$config[$part];
75
-                }else{
75
+                }else {
76 76
                     break;
77 77
                 }
78
-            }else{
79
-                if(isset($value[$part])) {
78
+            }else {
79
+                if (isset($value[$part])) {
80 80
                     $value = $value[$part];
81
-                }else{
81
+                }else {
82 82
                     break;
83 83
                 }
84 84
             }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      */
172 172
     public function setConfig($config) {
173 173
 
174
-        if(is_array($config) === false) {
174
+        if (is_array($config) === false) {
175 175
             $config = require $config;
176 176
         }
177 177
 
@@ -181,17 +181,17 @@  discard block
 block discarded – undo
181 181
         $vendor_config = require $path;
182 182
         $config = $this->array_merge_recursive_distinct($vendor_config, $config);
183 183
 
184
-        if(is_array($config)){
185
-            if(isset($config['default'])){
186
-                if(isset($config['accounts']) && $config['default'] != false){
184
+        if (is_array($config)) {
185
+            if (isset($config['default'])) {
186
+                if (isset($config['accounts']) && $config['default'] != false) {
187 187
 
188 188
                     $default_config = $vendor_config['accounts']['default'];
189
-                    if(isset($config['accounts'][$config['default']])){
189
+                    if (isset($config['accounts'][$config['default']])) {
190 190
                         $default_config = array_merge($default_config, $config['accounts'][$config['default']]);
191 191
                     }
192 192
 
193
-                    if(is_array($config['accounts'])){
194
-                        foreach($config['accounts'] as $account_key => $account){
193
+                    if (is_array($config['accounts'])) {
194
+                        foreach ($config['accounts'] as $account_key => $account) {
195 195
                             $config['accounts'][$account_key] = array_merge($default_config, $account);
196 196
                         }
197 197
                     }
@@ -227,24 +227,24 @@  discard block
 block discarded – undo
227 227
         $arrays = func_get_args();
228 228
         $base = array_shift($arrays);
229 229
 
230
-        if(!is_array($base)) $base = empty($base) ? array() : array($base);
230
+        if (!is_array($base)) $base = empty($base) ? array() : array($base);
231 231
 
232
-        foreach($arrays as $append) {
232
+        foreach ($arrays as $append) {
233 233
 
234
-            if(!is_array($append)) $append = array($append);
234
+            if (!is_array($append)) $append = array($append);
235 235
 
236
-            foreach($append as $key => $value) {
236
+            foreach ($append as $key => $value) {
237 237
 
238
-                if(!array_key_exists($key, $base) and !is_numeric($key)) {
238
+                if (!array_key_exists($key, $base) and !is_numeric($key)) {
239 239
                     $base[$key] = $append[$key];
240 240
                     continue;
241 241
                 }
242 242
 
243
-                if(is_array($value) or is_array($base[$key])) {
243
+                if (is_array($value) or is_array($base[$key])) {
244 244
                     $base[$key] = $this->array_merge_recursive_distinct($base[$key], $append[$key]);
245
-                } else if(is_numeric($key)) {
246
-                    if(!in_array($value, $base)) $base[] = $value;
247
-                } else {
245
+                }else if (is_numeric($key)) {
246
+                    if (!in_array($value, $base)) $base[] = $value;
247
+                }else {
248 248
                     $base[$key] = $value;
249 249
                 }
250 250
 
Please login to merge, or discard this patch.
examples/message_table.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
26 26
     </tr>
27 27
     </thead>
28 28
     <tbody>
29
-    <?php if($paginator->count() > 0): ?>
30
-        <?php foreach($paginator as $message): ?>
29
+    <?php if ($paginator->count() > 0): ?>
30
+        <?php foreach ($paginator as $message): ?>
31 31
             <tr>
32 32
                 <td><?php echo $message->getUid(); ?></td>
33 33
                 <td><?php echo $message->getSubject(); ?></td>
Please login to merge, or discard this patch.
examples/folder_structure.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
     </tr>
25 25
     </thead>
26 26
     <tbody>
27
-    <?php if($paginator->count() > 0): ?>
28
-        <?php foreach($paginator as $folder): ?>
27
+    <?php if ($paginator->count() > 0): ?>
28
+        <?php foreach ($paginator as $folder): ?>
29 29
                 <tr>
30 30
                     <td><?php echo $folder->name; ?></td>
31 31
                     <td><?php echo $folder->search()->unseen()->setFetchBody(false)->count(); ?></td>
Please login to merge, or discard this patch.
src/Support/Masks/Mask.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     public function __construct($parent) {
44 44
         $this->parent = $parent;
45 45
 
46
-        if(method_exists($this->parent, 'getAttributes')){
46
+        if (method_exists($this->parent, 'getAttributes')) {
47 47
             $this->attributes = array_merge($this->attributes, $this->parent->getAttributes());
48 48
         }
49 49
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     /**
54 54
      * Boot method made to be used by any custom mask
55 55
      */
56
-    protected function boot(){}
56
+    protected function boot() {}
57 57
 
58 58
     /**
59 59
      * Call dynamic attribute setter and getter methods and inherit the parent calls
@@ -64,17 +64,17 @@  discard block
 block discarded – undo
64 64
      * @throws MethodNotFoundException
65 65
      */
66 66
     public function __call($method, $arguments) {
67
-        if(strtolower(substr($method, 0, 3)) === 'get') {
67
+        if (strtolower(substr($method, 0, 3)) === 'get') {
68 68
             $name = Str::snake(substr($method, 3));
69 69
 
70
-            if(isset($this->attributes[$name])) {
70
+            if (isset($this->attributes[$name])) {
71 71
                 return $this->attributes[$name];
72 72
             }
73 73
 
74 74
         }elseif (strtolower(substr($method, 0, 3)) === 'set') {
75 75
             $name = Str::snake(substr($method, 3));
76 76
 
77
-            if(isset($this->attributes[$name])) {
77
+            if (isset($this->attributes[$name])) {
78 78
                 $this->attributes[$name] = array_pop($arguments);
79 79
 
80 80
                 return $this->attributes[$name];
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
         }
84 84
 
85
-        if(method_exists($this->parent, $method) === true){
85
+        if (method_exists($this->parent, $method) === true) {
86 86
             return call_user_func_array([$this->parent, $method], $arguments);
87 87
         }
88 88
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      * @return mixed|null
110 110
      */
111 111
     public function __get($name) {
112
-        if(isset($this->attributes[$name])) {
112
+        if (isset($this->attributes[$name])) {
113 113
             return $this->attributes[$name];
114 114
         }
115 115
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      *
122 122
      * @return mixed
123 123
      */
124
-    public function getParent(){
124
+    public function getParent() {
125 125
         return $this->parent;
126 126
     }
127 127
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      *
131 131
      * @return array
132 132
      */
133
-    public function getAttributes(){
133
+    public function getAttributes() {
134 134
         return $this->attributes;
135 135
     }
136 136
 
Please login to merge, or discard this patch.
src/Attachment.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         $this->part_number = $part->part_number;
105 105
 
106 106
         $default_mask = $this->oMessage->getClient()->getDefaultAttachmentMask();
107
-        if($default_mask != null) {
107
+        if ($default_mask != null) {
108 108
             $this->mask = $default_mask;
109 109
         }
110 110
 
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
      * @throws MethodNotFoundException
122 122
      */
123 123
     public function __call($method, $arguments) {
124
-        if(strtolower(substr($method, 0, 3)) === 'get') {
124
+        if (strtolower(substr($method, 0, 3)) === 'get') {
125 125
             $name = Str::snake(substr($method, 3));
126 126
 
127
-            if(isset($this->attributes[$name])) {
127
+            if (isset($this->attributes[$name])) {
128 128
                 return $this->attributes[$name];
129 129
             }
130 130
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      * @return mixed|null
161 161
      */
162 162
     public function __get($name) {
163
-        if(isset($this->attributes[$name])) {
163
+        if (isset($this->attributes[$name])) {
164 164
             return $this->attributes[$name];
165 165
         }
166 166
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
         if (IMAP::ATTACHMENT_TYPE_MESSAGE == $this->part->type) {
230 230
             if ($this->part->ifdescription) {
231 231
                 $this->setName($this->part->description);
232
-            } else {
232
+            }else {
233 233
                 $this->setName($this->part->subtype);
234 234
             }
235 235
         }
@@ -255,9 +255,9 @@  discard block
 block discarded – undo
255 255
     public function setName($name) {
256 256
         $decoder = $this->config['decoder']['attachment'];
257 257
         if ($name !== null) {
258
-            if($decoder === 'utf-8' && extension_loaded('imap')) {
258
+            if ($decoder === 'utf-8' && extension_loaded('imap')) {
259 259
                 $this->name = \imap_utf8($name);
260
-            }else{
260
+            }else {
261 261
                 $this->name = mb_decode_mimeheader($name);
262 262
             }
263 263
         }
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
      *
269 269
      * @return string|null
270 270
      */
271
-    public function getMimeType(){
271
+    public function getMimeType() {
272 272
         return (new \finfo())->buffer($this->getContent(), FILEINFO_MIME_TYPE);
273 273
     }
274 274
 
@@ -277,9 +277,9 @@  discard block
 block discarded – undo
277 277
      *
278 278
      * @return string|null
279 279
      */
280
-    public function getExtension(){
280
+    public function getExtension() {
281 281
         $deprecated_guesser = "\Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser";
282
-        if (class_exists($deprecated_guesser) !== false){
282
+        if (class_exists($deprecated_guesser) !== false) {
283 283
             return $deprecated_guesser::getInstance()->guess($this->getMimeType());
284 284
         }
285 285
         $guesser = "\Symfony\Component\Mime\MimeTypes";
@@ -292,14 +292,14 @@  discard block
 block discarded – undo
292 292
      *
293 293
      * @return array
294 294
      */
295
-    public function getAttributes(){
295
+    public function getAttributes() {
296 296
         return $this->attributes;
297 297
     }
298 298
 
299 299
     /**
300 300
      * @return Message
301 301
      */
302
-    public function getMessage(){
302
+    public function getMessage() {
303 303
         return $this->oMessage;
304 304
     }
305 305
 
@@ -309,8 +309,8 @@  discard block
 block discarded – undo
309 309
      *
310 310
      * @return $this
311 311
      */
312
-    public function setMask($mask){
313
-        if(class_exists($mask)){
312
+    public function setMask($mask) {
313
+        if (class_exists($mask)) {
314 314
             $this->mask = $mask;
315 315
         }
316 316
 
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
      *
323 323
      * @return string
324 324
      */
325
-    public function getMask(){
325
+    public function getMask() {
326 326
         return $this->mask;
327 327
     }
328 328
 
@@ -333,9 +333,9 @@  discard block
 block discarded – undo
333 333
      * @return mixed
334 334
      * @throws MaskNotFoundException
335 335
      */
336
-    public function mask($mask = null){
336
+    public function mask($mask = null) {
337 337
         $mask = $mask !== null ? $mask : $this->mask;
338
-        if(class_exists($mask)){
338
+        if (class_exists($mask)) {
339 339
             return new $mask($this);
340 340
         }
341 341
 
Please login to merge, or discard this patch.