@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public static function fromAttachmentFilter() |
32 | 32 | { |
33 | - return function (IMessagePart $part) { |
|
33 | + return function(IMessagePart $part) { |
|
34 | 34 | $type = $part->getContentType(); |
35 | 35 | $disp = $part->getContentDisposition(); |
36 | - if (in_array($type, [ 'text/plain', 'text/html' ]) && $disp !== null && strcasecmp($disp, 'inline') === 0) { |
|
36 | + if (in_array($type, ['text/plain', 'text/html']) && $disp !== null && strcasecmp($disp, 'inline') === 0) { |
|
37 | 37 | return false; |
38 | 38 | } |
39 | 39 | return !(($part instanceof IMimePart) |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public static function fromHeaderValue($name, $value, $excludeSignedParts = true) |
58 | 58 | { |
59 | - return function (IMessagePart $part) use ($name, $value, $excludeSignedParts) { |
|
59 | + return function(IMessagePart $part) use ($name, $value, $excludeSignedParts) { |
|
60 | 60 | if ($part instanceof IMimePart) { |
61 | 61 | if ($excludeSignedParts && $part->isSignaturePart()) { |
62 | 62 | return false; |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public static function fromContentType($mimeType) |
78 | 78 | { |
79 | - return function (IMessagePart $part) use ($mimeType) { |
|
80 | - return strcasecmp($part->getContentType() ? : '', $mimeType) === 0; |
|
79 | + return function(IMessagePart $part) use ($mimeType) { |
|
80 | + return strcasecmp($part->getContentType() ?: '', $mimeType) === 0; |
|
81 | 81 | }; |
82 | 82 | } |
83 | 83 | |
@@ -90,9 +90,9 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public static function fromInlineContentType($mimeType) |
92 | 92 | { |
93 | - return function (IMessagePart $part) use ($mimeType) { |
|
93 | + return function(IMessagePart $part) use ($mimeType) { |
|
94 | 94 | $disp = $part->getContentDisposition(); |
95 | - return (strcasecmp($part->getContentType() ? : '', $mimeType) === 0) && ($disp === null |
|
95 | + return (strcasecmp($part->getContentType() ?: '', $mimeType) === 0) && ($disp === null |
|
96 | 96 | || strcasecmp($disp, 'attachment') !== 0); |
97 | 97 | }; |
98 | 98 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | */ |
112 | 112 | public static function fromDisposition($disposition, $includeMultipart = false, $includeSignedParts = false) |
113 | 113 | { |
114 | - return function (IMessagePart $part) use ($disposition, $includeMultipart, $includeSignedParts) { |
|
114 | + return function(IMessagePart $part) use ($disposition, $includeMultipart, $includeSignedParts) { |
|
115 | 115 | if (($part instanceof IMimePart) && ((!$includeMultipart && $part->isMultiPart()) || (!$includeSignedParts && $part->isSignaturePart()))) { |
116 | 116 | return false; |
117 | 117 | } |