@@ -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); |
@@ -154,7 +154,7 @@ |
||
| 154 | 154 | return \array_reduce( |
| 155 | 155 | $parts, |
| 156 | 156 | function($carry, $item) { |
| 157 | - return $carry . $item; |
|
| 157 | + return $carry.$item; |
|
| 158 | 158 | }, |
| 159 | 159 | '' |
| 160 | 160 | ); |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | $dateToken = \preg_replace('# ([0-9]{4})$#', ' +$1', $dateToken); |
| 42 | 42 | // @see https://bugs.php.net/bug.php?id=42486 |
| 43 | 43 | } elseif (\preg_match('#UT$#', $dateToken)) { |
| 44 | - $dateToken = $dateToken . 'C'; |
|
| 44 | + $dateToken = $dateToken.'C'; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | try { |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | $this->addRawHeaderToPart($offset, $header, $container); |
| 60 | 60 | $header = ''; |
| 61 | 61 | } else { |
| 62 | - $line = "\r\n" . $line; |
|
| 62 | + $line = "\r\n".$line; |
|
| 63 | 63 | } |
| 64 | 64 | $header .= \rtrim($line, "\r\n"); |
| 65 | 65 | } while ($header !== ''); |
@@ -82,11 +82,10 @@ |
||
| 82 | 82 | foreach ($this->parsers as $parser) { |
| 83 | 83 | if ($parser->canParse($partBuilder)) { |
| 84 | 84 | $factory = ($partBuilder->getParent() === null) ? |
| 85 | - $parser->getParserMessageProxyFactory() : |
|
| 86 | - $parser->getParserPartProxyFactory(); |
|
| 85 | + $parser->getParserMessageProxyFactory() : $parser->getParserPartProxyFactory(); |
|
| 87 | 86 | return $factory->newInstance($partBuilder, $parser); |
| 88 | 87 | } |
| 89 | 88 | } |
| 90 | - throw new CompatibleParserNotFoundException('Compatible parser for a part cannot be found with content-type: ' . $partBuilder->getHeaderContainer()->get('Content-Type')); |
|
| 89 | + throw new CompatibleParserNotFoundException('Compatible parser for a part cannot be found with content-type: '.$partBuilder->getHeaderContainer()->get('Content-Type')); |
|
| 91 | 90 | } |
| 92 | 91 | } |
@@ -341,11 +341,11 @@ |
||
| 341 | 341 | { |
| 342 | 342 | $params = ''; |
| 343 | 343 | if (!empty($this->getMessageId())) { |
| 344 | - $params .= ', message-id=' . $this->getContentId(); |
|
| 344 | + $params .= ', message-id='.$this->getContentId(); |
|
| 345 | 345 | } |
| 346 | - $params .= ', content-type=' . $this->getContentType(); |
|
| 346 | + $params .= ', content-type='.$this->getContentType(); |
|
| 347 | 347 | $nsClass = get_class($this); |
| 348 | 348 | $class = substr($nsClass, (strrpos($nsClass, '\\') ?? -1) + 1); |
| 349 | - return $class . '(' . spl_object_id($this) . $params . ')'; |
|
| 349 | + return $class.'('.spl_object_id($this).$params.')'; |
|
| 350 | 350 | } |
| 351 | 351 | } |
@@ -251,12 +251,12 @@ |
||
| 251 | 251 | { |
| 252 | 252 | $params = ''; |
| 253 | 253 | if (!empty($this->getContentId())) { |
| 254 | - $params .= ', content-id=' . $this->getContentId(); |
|
| 254 | + $params .= ', content-id='.$this->getContentId(); |
|
| 255 | 255 | } |
| 256 | - $params .= ', content-type=' . $this->getContentType(); |
|
| 256 | + $params .= ', content-type='.$this->getContentType(); |
|
| 257 | 257 | $nsClass = get_class($this); |
| 258 | 258 | $class = substr($nsClass, (strrpos($nsClass, '\\') ?? -1) + 1); |
| 259 | - return $class . '(' . spl_object_id($this) . $params . ')'; |
|
| 259 | + return $class.'('.spl_object_id($this).$params.')'; |
|
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | protected function getErrorBagChildren() : array |
@@ -308,6 +308,6 @@ |
||
| 308 | 308 | |
| 309 | 309 | public function getErrorBagChildren(): array |
| 310 | 310 | { |
| 311 | - return \array_merge([ $this->headerContainer ], parent::getErrorBagChildren()); |
|
| 311 | + return \array_merge([$this->headerContainer], parent::getErrorBagChildren()); |
|
| 312 | 312 | } |
| 313 | 313 | } |