@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | */ |
61 | 61 | public function getTokenSeparators() |
62 | 62 | { |
63 | - return [ ',', ';', '\s+' ]; |
|
63 | + return [',', ';', '\s+']; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
@@ -116,14 +116,14 @@ discard block |
||
116 | 116 | ) |
117 | 117 | ]; |
118 | 118 | } elseif ($part instanceof AddressPart) { |
119 | - return [ $this->partFactory->newAddressPart($strName, $part->getEmail()) ]; |
|
119 | + return [$this->partFactory->newAddressPart($strName, $part->getEmail())]; |
|
120 | 120 | } elseif ((($part instanceof LiteralPart) && !($part instanceof CommentPart)) && $part->getValue() !== '') { |
121 | - $strEmail .= '"' . preg_replace('/(["\\\])/', "\\\\$1", $part->getValue()) . '"'; |
|
121 | + $strEmail .= '"'.preg_replace('/(["\\\])/', "\\\\$1", $part->getValue()).'"'; |
|
122 | 122 | } else { |
123 | 123 | $strEmail .= preg_replace('/\s+/', '', $part->getValue()); |
124 | 124 | } |
125 | 125 | $strName .= $part->getValue(); |
126 | 126 | } |
127 | - return [ $this->partFactory->newAddressPart('', $strEmail) ]; |
|
127 | + return [$this->partFactory->newAddressPart('', $strEmail)]; |
|
128 | 128 | } |
129 | 129 | } |
@@ -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 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | // Function defined by PHP should be called using the correct casing. |
111 | 111 | 'native_function_casing' => true, |
112 | 112 | // Add leading `\` before function invocation to speed up resolving. |
113 | - 'native_function_invocation' => ['include'=>['@all','trans']], |
|
113 | + 'native_function_invocation' => ['include'=>['@all', 'trans']], |
|
114 | 114 | // Native type hints for functions should use the correct case. |
115 | 115 | 'native_function_type_declaration_casing' => true, |
116 | 116 | // All instances created with new keyword must be followed by braces. |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | // There should not be space before or after object operators `->` and `?->`. |
193 | 193 | 'object_operator_without_whitespace' => true, |
194 | 194 | // Orders the elements of classes/interfaces/traits. |
195 | - 'ordered_class_elements' => ['order'=>['use_trait','constant_public','constant_protected','constant_private','property_public','property_protected','property_private']], |
|
195 | + 'ordered_class_elements' => ['order'=>['use_trait', 'constant_public', 'constant_protected', 'constant_private', 'property_public', 'property_protected', 'property_private']], |
|
196 | 196 | // Ordering `use` statements. |
197 | 197 | 'ordered_imports' => true, |
198 | 198 | // Orders the interfaces in an `implements` or `interface extends` clause. |