Passed
Push — 3.0 ( 999ef2 )
by Zaahid
09:22
created
Category
src/Header/Consumer/CommentConsumerService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,9 +100,9 @@
 block discarded – undo
100 100
         foreach ($parts as $part) {
101 101
             // order is important here - CommentPart extends LiteralPart
102 102
             if ($part instanceof CommentPart) {
103
-                $comment .= '(' . $part->getComment() . ')';
103
+                $comment .= '('.$part->getComment().')';
104 104
             } elseif ($part instanceof LiteralPart) {
105
-                $comment .= '"' . \str_replace('(["\\])', '\$1', $part->getValue()) . '"';
105
+                $comment .= '"'.\str_replace('(["\\])', '\$1', $part->getValue()).'"';
106 106
             } else {
107 107
                 $comment .= $part->getValue();
108 108
             }
Please login to merge, or discard this patch.
src/Header/Consumer/GenericConsumerService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      * @param HeaderPart[] $parts
86 86
      * @param HeaderPart[] $retParts
87 87
      */
88
-    private function addSpaceToRetParts(array $parts, array &$retParts, int $curIndex, HeaderPart &$spacePart, HeaderPart $lastPart) : self
88
+    private function addSpaceToRetParts(array $parts, array &$retParts, int $curIndex, HeaderPart & $spacePart, HeaderPart $lastPart) : self
89 89
     {
90 90
         $nextPart = $parts[$curIndex];
91 91
         if ($this->shouldAddSpace($nextPart, $lastPart)) {
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      * @param HeaderPart[] $retParts
107 107
      * @param HeaderPart $spacePart
108 108
      */
109
-    private function addSpaces(array $parts, array &$retParts, int $curIndex, ?HeaderPart &$spacePart = null) : self
109
+    private function addSpaces(array $parts, array &$retParts, int $curIndex, ?HeaderPart & $spacePart = null) : self
110 110
     {
111 111
         $lastPart = \end($retParts);
112 112
         if ($spacePart !== null && $curIndex < \count($parts) && $parts[$curIndex]->getValue() !== '' && $lastPart !== false) {
Please login to merge, or discard this patch.
src/Header/Consumer/AddressEmailConsumerService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
         foreach ($parts as $p) {
79 79
             $val = $p->getValue();
80 80
             if ((($p instanceof LiteralPart) && !($p instanceof CommentPart)) && $val !== '') {
81
-                $val = '"' . \preg_replace('/(["\\\])/', '\\\$1', $val) . '"';
81
+                $val = '"'.\preg_replace('/(["\\\])/', '\\\$1', $val).'"';
82 82
             } else {
83 83
                 $val = \preg_replace('/\s+/', '', $val);
84 84
             }
Please login to merge, or discard this patch.
src/Header/Consumer/ReceivedConsumerService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
     protected function getTokenSplitPattern() : string
88 88
     {
89 89
         $sChars = \implode('|', $this->getAllTokenSeparators());
90
-        return '~(' . $sChars . ')~';
90
+        return '~('.$sChars.')~';
91 91
     }
92 92
 
93 93
     /**
Please login to merge, or discard this patch.
src/Header/Consumer/ParameterConsumerService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     {
53 53
         $sChars = \implode('|', $this->getAllTokenSeparators());
54 54
         $mimePartPattern = MimeLiteralPart::MIME_PART_PATTERN_NO_QUOTES;
55
-        return '~(' . $mimePartPattern . '|\\\\.|' . $sChars . ')~';
55
+        return '~('.$mimePartPattern.'|\\\\.|'.$sChars.')~';
56 56
     }
57 57
 
58 58
     /**
Please login to merge, or discard this patch.
src/Header/Consumer/SubjectConsumerService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
     protected function getTokenSplitPattern() : string
88 88
     {
89 89
         $sChars = \implode('|', $this->getAllTokenSeparators());
90
-        return '~(' . $sChars . ')~';
90
+        return '~('.$sChars.')~';
91 91
     }
92 92
 
93 93
     /**
Please login to merge, or discard this patch.
src/Header/Consumer/IdConsumerService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,10 +65,10 @@
 block discarded – undo
65 65
      */
66 66
     protected function processParts(array $parts) : array
67 67
     {
68
-        $id = \array_reduce(\array_filter($parts), function ($c, $p) {
69
-            return $c . $p->getValue();
68
+        $id = \array_reduce(\array_filter($parts), function($c, $p) {
69
+            return $c.$p->getValue();
70 70
         }, '');
71
-        return array_merge([$this->partFactory->newLiteralPart($id)], \array_values(\array_filter($parts, function ($p) {
71
+        return array_merge([$this->partFactory->newLiteralPart($id)], \array_values(\array_filter($parts, function($p) {
72 72
             return ($p instanceof CommentPart);
73 73
         })));
74 74
     }
Please login to merge, or discard this patch.
src/Header/Consumer/AbstractConsumerService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function __invoke(string $value) : array
73 73
     {
74
-        $this->getLogger()->debug('Starting ${class} for "${value}"', [ 'class' => static::class, 'value' => $value ]);
74
+        $this->getLogger()->debug('Starting ${class} for "${value}"', ['class' => static::class, 'value' => $value]);
75 75
         if ($value !== '') {
76 76
             $parts = $this->parseRawValue($value);
77 77
             $this->getLogger()->debug(
78 78
                 'Ending ${class} for "${value}": parsed into ${cnt} header part objects',
79
-                [ 'class' => static::class, 'value' => $value, 'cnt' => count($parts) ]
79
+                ['class' => static::class, 'value' => $value, 'cnt' => count($parts)]
80 80
             );
81 81
             return $parts;
82 82
         }
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     {
177 177
         $sChars = \implode('|', $this->getAllTokenSeparators());
178 178
         $mimePartPattern = MimeLiteralPart::MIME_PART_PATTERN;
179
-        return '~(' . $mimePartPattern . '|\\\\.|' . $sChars . ')~';
179
+        return '~('.$mimePartPattern.'|\\\\.|'.$sChars.')~';
180 180
     }
181 181
 
182 182
     /**
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
             $this->tokenSplitPattern = $this->getTokenSplitPattern();
196 196
             $this->getLogger()->debug(
197 197
                 'Configuring ${class} with token split pattern: ${pattern}',
198
-                [ 'class' => static::class, 'pattern' => $this->tokenSplitPattern]
198
+                ['class' => static::class, 'pattern' => $this->tokenSplitPattern]
199 199
             );
200 200
         }
201 201
         return \preg_split(
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
             if ($consumer->isStartToken($token)) {
267 267
                 $this->getLogger()->debug(
268 268
                     'Token: "${value}" in ${class} starting sub-consumer ${consumer}',
269
-                    [ 'value' => $token, 'class' => static::class, 'consumer' => get_class($consumer) ]
269
+                    ['value' => $token, 'class' => static::class, 'consumer' => get_class($consumer)]
270 270
                 );
271 271
                 $this->advanceToNextToken($tokens, true);
272 272
                 return $consumer->parseTokensIntoParts($tokens);
Please login to merge, or discard this patch.
src/Header/Consumer/AddressConsumerService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
             } elseif ($part instanceof AddressPart) {
114 114
                 return [$this->partFactory->newAddressPart($strName, $part->getEmail())];
115 115
             } elseif ((($part instanceof LiteralPart) && !($part instanceof CommentPart)) && $part->getValue() !== '') {
116
-                $strEmail .= '"' . \preg_replace('/(["\\\])/', '\\\$1', $part->getValue()) . '"';
116
+                $strEmail .= '"'.\preg_replace('/(["\\\])/', '\\\$1', $part->getValue()).'"';
117 117
             } else {
118 118
                 $strEmail .= \preg_replace('/\s+/', '', $part->getValue());
119 119
             }
Please login to merge, or discard this patch.