Test Failed
Push — 2.0 ( 4d4d2f...3431b8 )
by Zaahid
04:28
created
src/Header/Consumer/Received/GenericReceivedConsumer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Header/MimeEncodedHeader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/Header/Part/DatePart.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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 {
Please login to merge, or discard this patch.
src/Stream/MessagePartStream.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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));
Please login to merge, or discard this patch.
src/Container.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Message/PartFilter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@
 block discarded – undo
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()));
Please login to merge, or discard this patch.
src/Message/MultiPart.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     private function getAllPartsIterator()
52 52
     {
53 53
         $iter = new AppendIterator();
54
-        $iter->append(new ArrayIterator([ $this ]));
54
+        $iter->append(new ArrayIterator([$this]));
55 55
         $iter->append(new RecursiveIteratorIterator($this->partChildrenContainer, RecursiveIteratorIterator::SELF_FIRST));
56 56
         return $iter;
57 57
     }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     public function getPartByContentId($contentId)
139 139
     {
140 140
         $sanitized = preg_replace('/^\s*<|>\s*$/', '', $contentId);
141
-        return $this->getPart(0, function (IMessagePart $part) use ($sanitized) {
141
+        return $this->getPart(0, function(IMessagePart $part) use ($sanitized) {
142 142
             return strcasecmp($part->getContentId(), $sanitized) === 0;
143 143
         });
144 144
     }
Please login to merge, or discard this patch.
src/Message/Helper/MultipartHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     public function getUniqueBoundary($mimeType)
47 47
     {
48 48
         $type = ltrim(strtoupper(preg_replace('/^(multipart\/(.{3}).*|.*)$/i', '$2-', $mimeType)), '-');
49
-        return uniqid('----=MMP-' . $type . '-', true);
49
+        return uniqid('----=MMP-'.$type.'-', true);
50 50
     }
51 51
 
52 52
     /**
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $part->setRawHeader(
62 62
             'Content-Type',
63 63
             "$mimeType;\r\n\tboundary=\""
64
-                . $this->getUniqueBoundary($mimeType) . '"'
64
+                . $this->getUniqueBoundary($mimeType).'"'
65 65
         );
66 66
         $part->notify();
67 67
     }
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
     public function createAndAddPartForAttachment(IMessage $message, $resource, $mimeType, $disposition, $filename = null, $encoding = 'base64')
331 331
     {
332 332
         if ($filename === null) {
333
-            $filename = 'file' . uniqid();
333
+            $filename = 'file'.uniqid();
334 334
         }
335 335
 
336 336
         $safe = iconv('UTF-8', 'US-ASCII//translit//ignore', $filename);
Please login to merge, or discard this patch.
src/Message/PartHeaderContainer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $s = $this->headerFactory->getNormalizedHeaderName($name);
90 90
         if (isset($this->headerMap[$s])) {
91 91
             $self = $this;
92
-            $filtered = array_filter($this->headerMap[$s], function ($h) use ($name, $self) {
92
+            $filtered = array_filter($this->headerMap[$s], function($h) use ($name, $self) {
93 93
                 return (strcasecmp($self->headers[$h][0], $name) === 0);
94 94
             });
95 95
             return (!empty($filtered)) ? $filtered : $this->headerMap[$s];
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         $a = $this->getAllWithOriginalHeaderNameIfSet($name);
129 129
         if (!empty($a)) {
130 130
             $self = $this;
131
-            return array_map(function ($index) use ($self) {
131
+            return array_map(function($index) use ($self) {
132 132
                 return $self->getByIndex($index);
133 133
             }, $a);
134 134
         }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     public function add($name, $value)
208 208
     {
209 209
         $s = $this->headerFactory->getNormalizedHeaderName($name);
210
-        $this->headers[$this->nextIndex] = [ $name, $value ];
210
+        $this->headers[$this->nextIndex] = [$name, $value];
211 211
         $this->headerObjects[$this->nextIndex] = null;
212 212
         if (!isset($this->headerMap[$s])) {
213 213
             $this->headerMap[$s] = [];
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
             return;
236 236
         }
237 237
         $i = $this->headerMap[$s][$offset];
238
-        $this->headers[$i] = [ $name, $value ];
238
+        $this->headers[$i] = [$name, $value];
239 239
         $this->headerObjects[$i] = null;
240 240
     }
241 241
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
      */
248 248
     public function getHeaderObjects()
249 249
     {
250
-        return array_filter(array_map([ $this, 'getByIndex' ], array_keys($this->headers)));
250
+        return array_filter(array_map([$this, 'getByIndex'], array_keys($this->headers)));
251 251
     }
252 252
 
253 253
     /**
Please login to merge, or discard this patch.