@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $this->part_number = ($part_number) ? $part_number : $this->part_number; |
98 | 98 | |
99 | 99 | $default_mask = $this->oMessage->getClient()->getDefaultAttachmentMask(); |
100 | - if($default_mask != null) { |
|
100 | + if ($default_mask != null) { |
|
101 | 101 | $this->mask = $default_mask; |
102 | 102 | } |
103 | 103 | |
@@ -114,10 +114,10 @@ discard block |
||
114 | 114 | * @throws MethodNotFoundException |
115 | 115 | */ |
116 | 116 | public function __call($method, $arguments) { |
117 | - if(strtolower(substr($method, 0, 3)) === 'get') { |
|
117 | + if (strtolower(substr($method, 0, 3)) === 'get') { |
|
118 | 118 | $name = Str::snake(substr($method, 3)); |
119 | 119 | |
120 | - if(isset($this->attributes[$name])) { |
|
120 | + if (isset($this->attributes[$name])) { |
|
121 | 121 | return $this->attributes[$name]; |
122 | 122 | } |
123 | 123 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | * @return mixed|null |
152 | 152 | */ |
153 | 153 | public function __get($name) { |
154 | - if(isset($this->attributes[$name])) { |
|
154 | + if (isset($this->attributes[$name])) { |
|
155 | 155 | return $this->attributes[$name]; |
156 | 156 | } |
157 | 157 | |
@@ -263,9 +263,9 @@ discard block |
||
263 | 263 | * @param $name |
264 | 264 | */ |
265 | 265 | public function setName($name) { |
266 | - if($this->config['decoder']['message']['subject'] === 'utf-8') { |
|
266 | + if ($this->config['decoder']['message']['subject'] === 'utf-8') { |
|
267 | 267 | $this->name = \imap_utf8($name); |
268 | - }else{ |
|
268 | + } else { |
|
269 | 269 | $this->name = mb_decode_mimeheader($name); |
270 | 270 | } |
271 | 271 | } |
@@ -285,16 +285,16 @@ discard block |
||
285 | 285 | /** |
286 | 286 | * @return string|null |
287 | 287 | */ |
288 | - public function getMimeType(){ |
|
288 | + public function getMimeType() { |
|
289 | 289 | return (new \finfo())->buffer($this->getContent(), FILEINFO_MIME_TYPE); |
290 | 290 | } |
291 | 291 | |
292 | 292 | /** |
293 | 293 | * @return string|null |
294 | 294 | */ |
295 | - public function getExtension(){ |
|
295 | + public function getExtension() { |
|
296 | 296 | $deprecated_guesser = "\Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser"; |
297 | - if (class_exists($deprecated_guesser) !== false){ |
|
297 | + if (class_exists($deprecated_guesser) !== false) { |
|
298 | 298 | return $deprecated_guesser::getInstance()->guess($this->getMimeType()); |
299 | 299 | } |
300 | 300 | $guesser = "\Symfony\Component\Mime\MimeTypes"; |
@@ -305,14 +305,14 @@ discard block |
||
305 | 305 | /** |
306 | 306 | * @return array |
307 | 307 | */ |
308 | - public function getAttributes(){ |
|
308 | + public function getAttributes() { |
|
309 | 309 | return $this->attributes; |
310 | 310 | } |
311 | 311 | |
312 | 312 | /** |
313 | 313 | * @return Message |
314 | 314 | */ |
315 | - public function getMessage(){ |
|
315 | + public function getMessage() { |
|
316 | 316 | return $this->oMessage; |
317 | 317 | } |
318 | 318 | |
@@ -320,8 +320,8 @@ discard block |
||
320 | 320 | * @param $mask |
321 | 321 | * @return $this |
322 | 322 | */ |
323 | - public function setMask($mask){ |
|
324 | - if(class_exists($mask)){ |
|
323 | + public function setMask($mask) { |
|
324 | + if (class_exists($mask)) { |
|
325 | 325 | $this->mask = $mask; |
326 | 326 | } |
327 | 327 | |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | /** |
332 | 332 | * @return string |
333 | 333 | */ |
334 | - public function getMask(){ |
|
334 | + public function getMask() { |
|
335 | 335 | return $this->mask; |
336 | 336 | } |
337 | 337 | |
@@ -342,9 +342,9 @@ discard block |
||
342 | 342 | * @return mixed |
343 | 343 | * @throws MaskNotFoundException |
344 | 344 | */ |
345 | - public function mask($mask = null){ |
|
345 | + public function mask($mask = null) { |
|
346 | 346 | $mask = $mask !== null ? $mask : $this->mask; |
347 | - if(class_exists($mask)){ |
|
347 | + if (class_exists($mask)) { |
|
348 | 348 | return new $mask($this); |
349 | 349 | } |
350 | 350 |