@@ -108,8 +108,7 @@ |
||
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 | } |
@@ -123,8 +123,7 @@ discard block |
||
123 | 123 | public function getStream() |
124 | 124 | { |
125 | 125 | return ($this->parent !== null) ? |
126 | - $this->parent->getStream() : |
|
127 | - $this->messageStream; |
|
126 | + $this->parent->getStream() : $this->messageStream; |
|
128 | 127 | } |
129 | 128 | |
130 | 129 | /** |
@@ -136,8 +135,7 @@ discard block |
||
136 | 135 | public function getMessageResourceHandle() |
137 | 136 | { |
138 | 137 | return ($this->parent !== null) ? |
139 | - $this->parent->getMessageResourceHandle() : |
|
140 | - $this->messageHandle; |
|
138 | + $this->parent->getMessageResourceHandle() : $this->messageHandle; |
|
141 | 139 | } |
142 | 140 | |
143 | 141 | /** |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | // Function defined by PHP should be called using the correct casing. |
111 | 111 | 'native_function_casing' => true, |
112 | 112 | // Add leading `\` before function invocation to speed up resolving. |
113 | - 'native_function_invocation' => ['include'=>['@all','trans']], |
|
113 | + 'native_function_invocation' => ['include'=>['@all', 'trans']], |
|
114 | 114 | // Native type hints for functions should use the correct case. |
115 | 115 | 'native_function_type_declaration_casing' => true, |
116 | 116 | // All instances created with new keyword must be followed by braces. |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | // There should not be space before or after object operators `->` and `?->`. |
193 | 193 | 'object_operator_without_whitespace' => true, |
194 | 194 | // Orders the elements of classes/interfaces/traits. |
195 | - 'ordered_class_elements' => ['order'=>['use_trait','constant_public','constant_protected','constant_private','property_public','property_protected','property_private']], |
|
195 | + 'ordered_class_elements' => ['order'=>['use_trait', 'constant_public', 'constant_protected', 'constant_private', 'property_public', 'property_protected', 'property_private']], |
|
196 | 196 | // Ordering `use` statements. |
197 | 197 | 'ordered_imports' => true, |
198 | 198 | // Orders the interfaces in an `implements` or `interface extends` clause. |
@@ -1,4 +1,4 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -define ('TEST_DATA_DIR', __DIR__ . '/tests/_data'); |
|
4 | -define ('TEST_OUTPUT_DIR', __DIR__ . '/tests/_output'); |
|
3 | +define('TEST_DATA_DIR', __DIR__.'/tests/_data'); |
|
4 | +define('TEST_OUTPUT_DIR', __DIR__.'/tests/_output'); |
@@ -138,7 +138,7 @@ |
||
138 | 138 | { |
139 | 139 | if (!$value instanceof IMessagePart) { |
140 | 140 | throw new InvalidArgumentException( |
141 | - \get_class($value) . ' is not a ZBateson\MailMimeParser\Message\IMessagePart' |
|
141 | + \get_class($value).' is not a ZBateson\MailMimeParser\Message\IMessagePart' |
|
142 | 142 | ); |
143 | 143 | } |
144 | 144 | $index = $offset ?? \count($this->children); |
@@ -77,8 +77,7 @@ |
||
77 | 77 | foreach ($this->parsers as $parser) { |
78 | 78 | if ($parser->canParse($partBuilder)) { |
79 | 79 | $factory = ($partBuilder->getParent() === null) ? |
80 | - $parser->getParserMessageProxyFactory() : |
|
81 | - $parser->getParserPartProxyFactory(); |
|
80 | + $parser->getParserMessageProxyFactory() : $parser->getParserPartProxyFactory(); |
|
82 | 81 | return $factory->newInstance($partBuilder, $parser); |
83 | 82 | } |
84 | 83 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | $this->addRawHeaderToPart($header, $container); |
48 | 48 | $header = ''; |
49 | 49 | } else { |
50 | - $line = "\r\n" . $line; |
|
50 | + $line = "\r\n".$line; |
|
51 | 51 | } |
52 | 52 | $header .= \rtrim($line, "\r\n"); |
53 | 53 | } while ($header !== ''); |
@@ -100,9 +100,9 @@ |
||
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 | } |
@@ -89,6 +89,6 @@ |
||
89 | 89 | protected function getTokenSplitPattern() : string |
90 | 90 | { |
91 | 91 | $sChars = \implode('|', $this->getAllTokenSeparators()); |
92 | - return '~(' . $sChars . ')~'; |
|
92 | + return '~('.$sChars.')~'; |
|
93 | 93 | } |
94 | 94 | } |