@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | /** @return string */ |
| 78 | 78 | public function decodedContent() { |
| 79 | 79 | if ( $raw = $this->content() ) { |
| 80 | - switch ($this->parameter('encoding')) { |
|
| 80 | + switch ( $this->parameter('encoding') ) { |
|
| 81 | 81 | case ENC7BIT: |
| 82 | 82 | case ENC8BIT: |
| 83 | 83 | case ENCQUOTEDPRINTABLE: |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** @return bool */ |
| 105 | - public function saveAttachment($dir, $filenameOverride = null) { |
|
| 105 | + public function saveAttachment( $dir, $filenameOverride = null ) { |
|
| 106 | 106 | if ( $filename = $this->safeFilename() ) { |
| 107 | 107 | $filepath = realpath($dir) . '/' . ($filenameOverride ?? $filename); |
| 108 | 108 | if ( file_put_contents($filepath, $this->decodedContent()) ) { |
@@ -51,10 +51,10 @@ discard block |
||
| 51 | 51 | $this->parameters['bytes'] = @$structure->bytes; |
| 52 | 52 | |
| 53 | 53 | foreach ( (array) @$structure->parameters as $param ) { |
| 54 | - $this->parameters[ strtolower($param->attribute) ] = $param->value; |
|
| 54 | + $this->parameters[strtolower($param->attribute)] = $param->value; |
|
| 55 | 55 | } |
| 56 | 56 | foreach ( (array) @$structure->dparameters as $param ) { |
| 57 | - $this->parameters[ strtolower($param->attribute) ] = $param->value; |
|
| 57 | + $this->parameters[strtolower($param->attribute)] = $param->value; |
|
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | public function parameter( $name ) { |
| 66 | 66 | $parameters = $this->parameters(); |
| 67 | 67 | $structure = $this->structure(); |
| 68 | - return @$parameters[ strtolower($name) ] ?: @$structure->$name; |
|
| 68 | + return @$parameters[strtolower($name)] ?: @$structure->$name; |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** @return string[][] */ |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $this->headers = []; |
| 83 | 83 | foreach ( $headers as $header ) { |
| 84 | 84 | $x = explode(':', $header, 2); |
| 85 | - $this->headers[ trim(strtolower($x[0])) ][] = trim($x[1]); |
|
| 85 | + $this->headers[trim(strtolower($x[0]))][] = trim($x[1]); |
|
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | |