@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | protected function isStartToken(string $token) : bool |
| 76 | 76 | { |
| 77 | - $pattern = '/^' . \preg_quote($this->partName, '/') . '$/i'; |
|
| 77 | + $pattern = '/^'.\preg_quote($this->partName, '/').'$/i'; |
|
| 78 | 78 | return (\preg_match($pattern, $token) === 1); |
| 79 | 79 | } |
| 80 | 80 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | { |
| 106 | 106 | return [ |
| 107 | 107 | '\s+', |
| 108 | - '(\A\s*|\s+)(?i)' . \preg_quote($this->partName, '/') . '(?-i)(?=\s+)' |
|
| 108 | + '(\A\s*|\s+)(?i)'.\preg_quote($this->partName, '/').'(?-i)(?=\s+)' |
|
| 109 | 109 | ]; |
| 110 | 110 | } |
| 111 | 111 | |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | foreach ($filtered as $part) { |
| 126 | 126 | if ($part instanceof CommentPart) { |
| 127 | 127 | $ret[] = $part; |
| 128 | - continue; // getValue() is empty anyway, but for clarity... |
|
| 128 | + continue; // getValue() is empty anyway, but for clarity... |
|
| 129 | 129 | } |
| 130 | 130 | $strValue .= $part->getValue(); |
| 131 | 131 | } |
@@ -78,7 +78,7 @@ |
||
| 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 | } |
@@ -237,12 +237,12 @@ |
||
| 237 | 237 | { |
| 238 | 238 | $params = ''; |
| 239 | 239 | if (!empty($this->getContentId())) { |
| 240 | - $params .= ', content-id=' . $this->getContentId(); |
|
| 240 | + $params .= ', content-id='.$this->getContentId(); |
|
| 241 | 241 | } |
| 242 | - $params .= ', content-type=' . $this->getContentType(); |
|
| 242 | + $params .= ', content-type='.$this->getContentType(); |
|
| 243 | 243 | $nsClass = static::class; |
| 244 | 244 | $class = \substr($nsClass, (\strrpos($nsClass, '\\') ?? -1) + 1); |
| 245 | - return $class . '(' . \spl_object_id($this) . $params . ')'; |
|
| 245 | + return $class.'('.\spl_object_id($this).$params.')'; |
|
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | protected function getErrorBagChildren() : array |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | protected function processParts(array $parts) : array |
| 67 | 67 | { |
| 68 | 68 | $id = \array_reduce(\array_filter($parts), function($c, $p) { |
| 69 | - return $c . $p->getValue(); |
|
| 69 | + return $c.$p->getValue(); |
|
| 70 | 70 | }, ''); |
| 71 | 71 | return \array_merge([$this->partFactory->newLiteralPart($id)], \array_values(\array_filter($parts, function($p) { |
| 72 | 72 | return ($p instanceof CommentPart); |
@@ -161,7 +161,7 @@ |
||
| 161 | 161 | { |
| 162 | 162 | $sChars = \implode('|', $this->getAllTokenSeparators()); |
| 163 | 163 | $mimePartPattern = MimeLiteralPart::MIME_PART_PATTERN; |
| 164 | - return '~(' . $mimePartPattern . '|\\\\.|' . $sChars . ')~'; |
|
| 164 | + return '~('.$mimePartPattern.'|\\\\.|'.$sChars.')~'; |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | /** |
@@ -152,7 +152,7 @@ |
||
| 152 | 152 | |
| 153 | 153 | public function getErrorLoggingContextName() : string |
| 154 | 154 | { |
| 155 | - return 'Header::' . $this->getName(); |
|
| 155 | + return 'Header::'.$this->getName(); |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | protected function getErrorBagChildren() : array |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | if (self::$globalContainer === null) { |
| 81 | 81 | $builder = new ContainerBuilder(); |
| 82 | 82 | $builder->useAttributes(true); |
| 83 | - $builder->addDefinitions(__DIR__ . '/di_config.php'); |
|
| 83 | + $builder->addDefinitions(__DIR__.'/di_config.php'); |
|
| 84 | 84 | self::$globalContainer = $builder->build(); |
| 85 | 85 | } |
| 86 | 86 | return self::$globalContainer; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | /** |
| 90 | 90 | * Sets global configuration for php-di. |
| 91 | 91 | */ |
| 92 | - public static function setGlobalPhpDiConfiguration(array|string|DefinitionSource $phpDiConfig) : void |
|
| 92 | + public static function setGlobalPhpDiConfiguration(array | string | DefinitionSource $phpDiConfig) : void |
|
| 93 | 93 | { |
| 94 | 94 | $container = self::getGlobalContainer(); |
| 95 | 95 | $builder = new ContainerBuilder(); |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * @param ?LoggerInterface $logger |
| 125 | 125 | * @param ?array[] $phpDiContainerConfig |
| 126 | 126 | */ |
| 127 | - public function __construct(?LoggerInterface $logger = null, array|string|DefinitionSource|null $phpDiContainerConfig = null) |
|
| 127 | + public function __construct(?LoggerInterface $logger = null, array | string | DefinitionSource | null $phpDiContainerConfig = null) |
|
| 128 | 128 | { |
| 129 | 129 | $this->container = self::getGlobalContainer(); |
| 130 | 130 | if ($phpDiContainerConfig !== null || $logger !== null) { |
@@ -328,11 +328,11 @@ |
||
| 328 | 328 | { |
| 329 | 329 | $params = ''; |
| 330 | 330 | if (!empty($this->getMessageId())) { |
| 331 | - $params .= ', message-id=' . $this->getContentId(); |
|
| 331 | + $params .= ', message-id='.$this->getContentId(); |
|
| 332 | 332 | } |
| 333 | - $params .= ', content-type=' . $this->getContentType(); |
|
| 333 | + $params .= ', content-type='.$this->getContentType(); |
|
| 334 | 334 | $nsClass = static::class; |
| 335 | 335 | $class = \substr($nsClass, (\strrpos($nsClass, '\\') ?? -1) + 1); |
| 336 | - return $class . '(' . \spl_object_id($this) . $params . ')'; |
|
| 336 | + return $class.'('.\spl_object_id($this).$params.')'; |
|
| 337 | 337 | } |
| 338 | 338 | } |