Test Failed
Push — 2.0 ( 91a8b2...00e111 )
by Zaahid
08:02 queued 04:36
created
src/Message/Helper/GenericHelper.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
      *
108 108
      * @param IMimePart $part
109 109
      * @return MimePart the newly-created MimePart
110
-    */
110
+     */
111 111
     public function createNewContentPartFrom(IMimePart $part)
112 112
     {
113 113
         $mime = $this->mimePartFactory->newInstance();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      * @var string[] non mime content fields that are not related to the content
24 24
      *      of a part.
25 25
      */
26
-    private static $nonMimeContentFields = [ 'contentreturn', 'contentidentifier' ];
26
+    private static $nonMimeContentFields = ['contentreturn', 'contentidentifier'];
27 27
 
28 28
     /**
29 29
      * Returns true if the passed header's name is a Content-* header other than
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             $this->copyHeader($from, $to, HeaderConsts::CONTENT_TRANSFER_ENCODING);
97 97
         }
98 98
         foreach ($from->getAllHeaders() as $header) {
99
-            if ($this->isMimeContentField($header, [ 'contenttype', 'contenttransferencoding' ])) {
99
+            if ($this->isMimeContentField($header, ['contenttype', 'contenttransferencoding'])) {
100 100
                 $this->copyHeader($from, $to, $header->getName());
101 101
             }
102 102
         }
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.
src/Parser/PartBuilder.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -88,15 +88,13 @@
 block discarded – undo
88 88
     public function getStream()
89 89
     {
90 90
         return ($this->parent !== null) ?
91
-            $this->parent->getStream() :
92
-            $this->messageStream;
91
+            $this->parent->getStream() : $this->messageStream;
93 92
     }
94 93
 
95 94
     public function getMessageResourceHandle()
96 95
     {
97 96
         return ($this->parent !== null) ?
98
-            $this->parent->getMessageResourceHandle() :
99
-            $this->messageHandle;
97
+            $this->parent->getMessageResourceHandle() : $this->messageHandle;
100 98
     }
101 99
 
102 100
     public function getMessageResourceHandlePos()
Please login to merge, or discard this patch.
src/Parser/HeaderParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
                 $this->addRawHeaderToPart($header, $container);
49 49
                 $header = '';
50 50
             } else {
51
-                $line = "\r\n" . $line;
51
+                $line = "\r\n".$line;
52 52
             }
53 53
             $header .= rtrim($line, "\r\n");
54 54
         } while ($header !== '');
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
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function getUniqueBoundary($mimeType)
48 48
     {
49 49
         $type = ltrim(strtoupper(preg_replace('/^(multipart\/(.{3}).*|.*)$/i', '$2-', $mimeType)), '-');
50
-        return uniqid('----=MMP-' . $type . '-', true);
50
+        return uniqid('----=MMP-'.$type.'-', true);
51 51
     }
52 52
 
53 53
     /**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $part->setRawHeader(
63 63
             HeaderConsts::CONTENT_TYPE,
64 64
             "$mimeType;\r\n\tboundary=\""
65
-                . $this->getUniqueBoundary($mimeType) . '"'
65
+                . $this->getUniqueBoundary($mimeType).'"'
66 66
         );
67 67
         $part->notify();
68 68
     }
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
     public function createAndAddPartForAttachment(IMessage $message, $resource, $mimeType, $disposition, $filename = null, $encoding = 'base64')
332 332
     {
333 333
         if ($filename === null) {
334
-            $filename = 'file' . uniqid();
334
+            $filename = 'file'.uniqid();
335 335
         }
336 336
 
337 337
         $safe = iconv('UTF-8', 'US-ASCII//translit//ignore', $filename);
Please login to merge, or discard this patch.
src/Message/Helper/PrivacyHelper.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,8 +108,7 @@
 block discarded – undo
108 108
             $part->setRawHeader(
109 109
                 HeaderConsts::CONTENT_TRANSFER_ENCODING,
110 110
                 ($contentType === 'text/plain' || $contentType === 'text/html') ?
111
-                'quoted-printable' :
112
-                'base64'
111
+                'quoted-printable' : 'base64'
113 112
             );
114 113
         }
115 114
     }
Please login to merge, or discard this patch.
src/Message/PartChildrenContainer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             $this->children,
103 103
             $index,
104 104
             0,
105
-            [ $part ]
105
+            [$part]
106 106
         );
107 107
     }
108 108
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     {
138 138
         if (!$value instanceof IMessagePart) {
139 139
             throw new InvalidArgumentException(
140
-                get_class($value) . ' is not a ZBateson\MailMimeParser\Message\IMessagePart'
140
+                get_class($value).' is not a ZBateson\MailMimeParser\Message\IMessagePart'
141 141
             );
142 142
         }
143 143
         $index = ($offset === null) ? count($this->children) : $offset;
Please login to merge, or discard this patch.
src/Message/MimePart.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
     public function getContentDisposition($default = 'inline')
168 168
     {
169 169
         $value = strtolower($this->getHeaderValue(HeaderConsts::CONTENT_DISPOSITION));
170
-        if ($value === null || !in_array($value, [ 'inline', 'attachment' ])) {
170
+        if ($value === null || !in_array($value, ['inline', 'attachment'])) {
171 171
             return $default;
172 172
         }
173 173
         return $value;
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)
Please login to merge, or discard this patch.