Passed
Pull Request — master (#325)
by
unknown
02:35
created
src/Attachment.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         $this->part_number = $part->part_number;
104 104
 
105 105
         $default_mask = $this->oMessage->getClient()->getDefaultAttachmentMask();
106
-        if($default_mask != null) {
106
+        if ($default_mask != null) {
107 107
             $this->mask = $default_mask;
108 108
         }
109 109
 
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
      * @throws MethodNotFoundException
121 121
      */
122 122
     public function __call(string $method, array $arguments) {
123
-        if(strtolower(substr($method, 0, 3)) === 'get') {
123
+        if (strtolower(substr($method, 0, 3)) === 'get') {
124 124
             $name = Str::snake(substr($method, 3));
125 125
 
126
-            if(isset($this->attributes[$name])) {
126
+            if (isset($this->attributes[$name])) {
127 127
                 return $this->attributes[$name];
128 128
             }
129 129
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      * @return mixed|null
160 160
      */
161 161
     public function __get($name) {
162
-        if(isset($this->attributes[$name])) {
162
+        if (isset($this->attributes[$name])) {
163 163
             return $this->attributes[$name];
164 164
         }
165 165
 
@@ -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,7 +277,7 @@  discard block
 block discarded – undo
277 277
      *
278 278
      * @return string|null
279 279
      */
280
-    public function getExtension(){
280
+    public function getExtension() {
281 281
         $guesser = "\Symfony\Component\Mime\MimeTypes";
282 282
         if (class_exists($guesser) !== false) {
283 283
             /** @var Symfony\Component\Mime\MimeTypes $guesser */
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
         }
287 287
 
288 288
         $deprecated_guesser = "\Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser";
289
-        if (class_exists($deprecated_guesser) !== false){
289
+        if (class_exists($deprecated_guesser) !== false) {
290 290
             /** @var \Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser $deprecated_guesser */
291 291
             return $deprecated_guesser::getInstance()->guess($this->getMimeType());
292 292
         }
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
      * @return $this
318 318
      */
319 319
     public function setMask($mask): Attachment {
320
-        if(class_exists($mask)){
320
+        if (class_exists($mask)) {
321 321
             $this->mask = $mask;
322 322
         }
323 323
 
@@ -340,9 +340,9 @@  discard block
 block discarded – undo
340 340
      * @return mixed
341 341
      * @throws MaskNotFoundException
342 342
      */
343
-    public function mask($mask = null){
343
+    public function mask($mask = null) {
344 344
         $mask = $mask !== null ? $mask : $this->mask;
345
-        if(class_exists($mask)){
345
+        if (class_exists($mask)) {
346 346
             return new $mask($this);
347 347
         }
348 348
 
Please login to merge, or discard this patch.