@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | public static function normalizePresets($presets): ?array |
| 166 | 166 | { |
| 167 | 167 | // Map preset aliases to their correct value. |
| 168 | - return \array_unique(\array_filter(\array_map(static function (string $preset): string { |
|
| 168 | + return \array_unique(\array_filter(\array_map(static function(string $preset): string { |
|
| 169 | 169 | if (isset(EmojibaseShortcodeInterface::PRESET_ALIASES[$preset])) { |
| 170 | 170 | return EmojibaseShortcodeInterface::PRESET_ALIASES[$preset]; |
| 171 | 171 | } |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | { |
| 220 | 220 | $this->assertUninitialized('Failed to add renderer.'); |
| 221 | 221 | |
| 222 | - if (! isset($this->renderersByClass[$nodeClass])) { |
|
| 222 | + if (!isset($this->renderersByClass[$nodeClass])) { |
|
| 223 | 223 | /** @var PrioritizedList<NodeRendererInterface> $renderers */ |
| 224 | 224 | $renderers = new PrioritizedList(); |
| 225 | 225 | |
@@ -310,11 +310,11 @@ discard block |
||
| 310 | 310 | |
| 311 | 311 | /** @var ListenerData $listenerData */ |
| 312 | 312 | foreach ($this->listenerData as $listenerData) { |
| 313 | - if (! \is_a($event, $listenerData->getEvent())) { |
|
| 313 | + if (!\is_a($event, $listenerData->getEvent())) { |
|
| 314 | 314 | continue; |
| 315 | 315 | } |
| 316 | 316 | |
| 317 | - yield function (object $event) use ($listenerData): void { |
|
| 317 | + yield function(object $event) use ($listenerData): void { |
|
| 318 | 318 | $this->initialize(); |
| 319 | 319 | |
| 320 | 320 | \call_user_func($listenerData->getListener(), $event); |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | while (\class_exists($parent = (string) ($parent ?? $nodeClass)) && ($parent = \get_parent_class($parent))) { |
| 338 | - if (! isset($this->renderersByClass[$parent])) { |
|
| 338 | + if (!isset($this->renderersByClass[$parent])) { |
|
| 339 | 339 | continue; |
| 340 | 340 | } |
| 341 | 341 | |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | |
| 379 | 379 | $structuredConversionTypes = Expect::structure(\array_combine( |
| 380 | 380 | EmojiConverterInterface::TYPES, |
| 381 | - \array_map(static function (string $conversionType) use ($conversionTypes, $default): Schema { |
|
| 381 | + \array_map(static function(string $conversionType) use ($conversionTypes, $default): Schema { |
|
| 382 | 382 | return Expect::anyOf(false, ...$conversionTypes)->default($default)->nullable(); |
| 383 | 383 | }, EmojiConverterInterface::TYPES) |
| 384 | 384 | ))->castTo('array'); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | $walker = $e->getDocument()->walker(); |
| 44 | 44 | while ($event = $walker->next()) { |
| 45 | 45 | $node = $event->getNode(); |
| 46 | - if (! ($node instanceof Emoji) || $node->hexcode === null) { |
|
| 46 | + if (!($node instanceof Emoji) || $node->hexcode === null) { |
|
| 47 | 47 | continue; |
| 48 | 48 | } |
| 49 | 49 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | if ($inline && $size === null) { |
| 85 | 85 | $image->attributes->set('style', 'width: 1em; height: 1em; vertical-align: middle;'); |
| 86 | 86 | } elseif ($inline && $size !== null) { |
| 87 | - if (! \is_string($size)) { |
|
| 87 | + if (!\is_string($size)) { |
|
| 88 | 88 | $size .= 'em'; |
| 89 | 89 | } |
| 90 | 90 | |