Passed
Pull Request — master (#176)
by
unknown
04:33
created
src/Stream/HeaderStream.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,9 +54,9 @@
 block discarded – undo
54 54
             return $this->part->getRawHeaderIterator();
55 55
         } elseif ($this->part->getParent() !== null && $this->part->getParent()->isMime()) {
56 56
             return new ArrayIterator([
57
-                [ 'Content-Type', $this->part->getContentType() ],
58
-                [ 'Content-Disposition', $this->part->getContentDisposition() ],
59
-                [ 'Content-Transfer-Encoding', $this->part->getContentTransferEncoding() ]
57
+                ['Content-Type', $this->part->getContentType()],
58
+                ['Content-Disposition', $this->part->getContentDisposition()],
59
+                ['Content-Transfer-Encoding', $this->part->getContentTransferEncoding()]
60 60
             ]);
61 61
         }
62 62
         return new ArrayIterator();
Please login to merge, or discard this patch.
src/Container.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     {
147 147
         return $this->getInstance(
148 148
             'partFilterFactory',
149
-            __NAMESPACE__ . '\Message\PartFilterFactory'
149
+            __NAMESPACE__.'\Message\PartFilterFactory'
150 150
         );
151 151
     }
152 152
     
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
     {
195 195
         return $this->getInstance(
196 196
             'streamFactory',
197
-            __NAMESPACE__ . '\Stream\StreamFactory'
197
+            __NAMESPACE__.'\Stream\StreamFactory'
198 198
         );
199 199
     }
200 200
     
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         }
208 208
         return $this->getInstance(
209 209
             'partStreamFilterManagerFactory',
210
-            __NAMESPACE__ . '\Message\Part\PartStreamFilterManagerFactory'
210
+            __NAMESPACE__.'\Message\Part\PartStreamFilterManagerFactory'
211 211
         );
212 212
     }
213 213
     
Please login to merge, or discard this patch.
src/Header/Consumer/ReceivedConsumer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
     protected function getTokenSplitPattern()
89 89
     {
90 90
         $sChars = implode('|', $this->getAllTokenSeparators());
91
-        return '~(' . $sChars . ')~';
91
+        return '~('.$sChars.')~';
92 92
     }
93 93
 
94 94
     /**
Please login to merge, or discard this patch.
src/Header/Consumer/Received/DomainConsumer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
         $strValue = $ehloName;
111 111
         if ($commentPart !== null && $this->matchHostPart($commentPart->getComment(), $hostname, $address)) {
112
-            $strValue .= ' (' . $commentPart->getComment() . ')';
112
+            $strValue .= ' ('.$commentPart->getComment().')';
113 113
             $commentPart = null;
114 114
         }
115 115
 
@@ -120,6 +120,6 @@  discard block
 block discarded – undo
120 120
             $hostname,
121 121
             $address
122 122
         );
123
-        return array_filter([ $domainPart, $commentPart ]);
123
+        return array_filter([$domainPart, $commentPart]);
124 124
     }
125 125
 }
Please login to merge, or discard this patch.
src/Header/Consumer/IdBaseConsumer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
      */
97 97
     protected function processParts(array $parts)
98 98
     {
99
-        return array_values(array_filter($parts, function ($part) {
99
+        return array_values(array_filter($parts, function($part) {
100 100
             if (empty($part) || $part instanceof CommentPart) {
101 101
                 return false;
102 102
             }
Please login to merge, or discard this patch.
src/Header/Consumer/ParameterConsumer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     {
47 47
         $sChars = implode('|', $this->getAllTokenSeparators());
48 48
         $mimePartPattern = MimeLiteralPart::MIME_PART_PATTERN_NO_QUOTES;
49
-        return '~(' . $mimePartPattern . '|\\\\.|' . $sChars . ')~';
49
+        return '~('.$mimePartPattern.'|\\\\.|'.$sChars.')~';
50 50
     }
51 51
 
52 52
     /**
Please login to merge, or discard this patch.
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/Message/Helper/MultipartHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     public function getUniqueBoundary($mimeType)
58 58
     {
59 59
         $type = ltrim(strtoupper(preg_replace('/^(multipart\/(.{3}).*|.*)$/i', '$2-', $mimeType)), '-');
60
-        return uniqid('----=MMP-' . $type . '.', true);
60
+        return uniqid('----=MMP-'.$type.'.', true);
61 61
     }
62 62
 
63 63
     /**
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $part->setRawHeader(
73 73
             'Content-Type',
74 74
             "$mimeType;\r\n\tboundary=\""
75
-                . $this->getUniqueBoundary($mimeType) . '"'
75
+                . $this->getUniqueBoundary($mimeType).'"'
76 76
         );
77 77
     }
78 78
 
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     public function createAndAddPartForAttachment(Message $message, $resource, $mimeType, $disposition, $filename = null, $encoding = 'base64')
346 346
     {
347 347
         if ($filename === null) {
348
-            $filename = 'file' . uniqid();
348
+            $filename = 'file'.uniqid();
349 349
         }
350 350
 
351 351
         $safe = iconv('UTF-8', 'US-ASCII//translit//ignore', $filename);
Please login to merge, or discard this patch.
src/Header/HeaderContainer.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.