@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | protected function getSubConsumers() |
78 | 78 | { |
79 | - return [ $this->consumerService->getCommentConsumer() ]; |
|
79 | + return [$this->consumerService->getCommentConsumer()]; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | protected function isStartToken($token) |
90 | 90 | { |
91 | - $pattern = '/^\s*(' . preg_quote($this->getPartName(), '/') . ')\s*$/i'; |
|
91 | + $pattern = '/^\s*('.preg_quote($this->getPartName(), '/').')\s*$/i'; |
|
92 | 92 | return (preg_match($pattern, $token) === 1); |
93 | 93 | } |
94 | 94 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | { |
124 | 124 | return [ |
125 | 125 | '\s+', |
126 | - '(\A\s*)?(?i)' . preg_quote($this->getPartName(), '/') . '(?-i)\s+' |
|
126 | + '(\A\s*)?(?i)'.preg_quote($this->getPartName(), '/').'(?-i)\s+' |
|
127 | 127 | ]; |
128 | 128 | } |
129 | 129 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | foreach ($filtered as $part) { |
146 | 146 | if ($part instanceof CommentPart) { |
147 | 147 | $ret[] = $part; |
148 | - continue; // getValue() is empty anyway, but for clarity... |
|
148 | + continue; // getValue() is empty anyway, but for clarity... |
|
149 | 149 | } |
150 | 150 | $strValue .= $part->getValue(); |
151 | 151 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | protected function setParseHeaderValue(AbstractConsumer $consumer) |
55 | 55 | { |
56 | 56 | $value = $this->rawValue; |
57 | - $matchp = '~^(\s*' . MimeLiteralPart::MIME_PART_PATTERN . '\s*)+$~'; |
|
57 | + $matchp = '~^(\s*'.MimeLiteralPart::MIME_PART_PATTERN.'\s*)+$~'; |
|
58 | 58 | if (preg_match($matchp, $value)) { |
59 | 59 | $p = $this->mimeLiteralPartFactory->newInstance($value); |
60 | 60 | $value = $p->getValue(); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $dateToken = preg_replace('# ([0-9]{4})$#', ' +$1', $dateToken); |
43 | 43 | // @see https://bugs.php.net/bug.php?id=42486 |
44 | 44 | } elseif (preg_match('#UT$#', $dateToken)) { |
45 | - $dateToken = $dateToken . 'C'; |
|
45 | + $dateToken = $dateToken.'C'; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | try { |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $boundary = $part->getHeaderParameter('Content-Type', 'boundary'); |
158 | 158 | if ($boundary === null) { |
159 | 159 | return array_map( |
160 | - function ($child) { |
|
160 | + function($child) { |
|
161 | 161 | return $child->getStream(); |
162 | 162 | }, |
163 | 163 | $part->getChildParts() |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $content = Psr7\stream_for(); |
188 | 188 | $this->writePartContentTo($content); |
189 | 189 | $content->rewind(); |
190 | - $streams = [ $this->streamFactory->newHeaderStream($this->part), $content ]; |
|
190 | + $streams = [$this->streamFactory->newHeaderStream($this->part), $content]; |
|
191 | 191 | |
192 | 192 | if ($this->part instanceof IMimePart && $this->part->getChildCount() > 0) { |
193 | 193 | $streams = array_merge($streams, $this->getBoundaryAndChildStreams($this->part)); |
@@ -449,8 +449,7 @@ |
||
449 | 449 | |
450 | 450 | public function getStream() |
451 | 451 | { |
452 | - return ($this->messageStream !== null) ? $this->messageStream : |
|
453 | - $this->parent->getStream(); |
|
452 | + return ($this->messageStream !== null) ? $this->messageStream : $this->parent->getStream(); |
|
454 | 453 | } |
455 | 454 | |
456 | 455 | public function getMessageResourceHandle() |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $this->contentParsers, |
44 | 44 | $pos, |
45 | 45 | 0, |
46 | - [ $parser ] |
|
46 | + [$parser] |
|
47 | 47 | ); |
48 | 48 | } |
49 | 49 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $this->childParsers, |
61 | 61 | $pos, |
62 | 62 | 0, |
63 | - [ $parser ] |
|
63 | + [$parser] |
|
64 | 64 | ); |
65 | 65 | } |
66 | 66 |
@@ -101,7 +101,7 @@ |
||
101 | 101 | $this->addRawHeaderToPart($header, $partBuilder); |
102 | 102 | $header = ''; |
103 | 103 | } else { |
104 | - $line = "\r\n" . $line; |
|
104 | + $line = "\r\n".$line; |
|
105 | 105 | } |
106 | 106 | $header .= rtrim($line, "\r\n"); |
107 | 107 | } while ($header !== ''); |
@@ -33,10 +33,10 @@ |
||
33 | 33 | if (method_exists($param, 'getType')) { |
34 | 34 | $type = $param->getType(); |
35 | 35 | if ($type && !$type->isBuiltin()) { |
36 | - return '\\' . (method_exists($type, 'getName') ? $type->getName() : (string) $type); |
|
36 | + return '\\'.(method_exists($type, 'getName') ? $type->getName() : (string) $type); |
|
37 | 37 | } |
38 | 38 | } elseif ($param->getClass() !== null) { |
39 | - return '\\' . $param->getClass(); |
|
39 | + return '\\'.$param->getClass(); |
|
40 | 40 | } |
41 | 41 | return null; |
42 | 42 | } |
@@ -30,9 +30,9 @@ |
||
30 | 30 | */ |
31 | 31 | public static function fromAttachmentFilter() |
32 | 32 | { |
33 | - return function (IMessagePart $part) { |
|
33 | + return function(IMessagePart $part) { |
|
34 | 34 | $type = strtolower($part->getContentType()); |
35 | - if (in_array($type, [ 'text/plain', 'text/html' ]) && strcasecmp($part->getContentDisposition(), 'inline') === 0) { |
|
35 | + if (in_array($type, ['text/plain', 'text/html']) && strcasecmp($part->getContentDisposition(), 'inline') === 0) { |
|
36 | 36 | return false; |
37 | 37 | } |
38 | 38 | return !(($part instanceof IMimePart) && ($part->isMultiPart() || $part->isSignaturePart())); |