Shorten lines in bootstrap script example
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 2 Nov 2022 08:24:52 +0000 (09:24 +0100)
committerGitHub <noreply@github.com>
Wed, 2 Nov 2022 08:24:52 +0000 (09:24 +0100)
docs/migration/wsc55/php.md

index 49bedd4f90512f30a84107e58375d49a36378b29..bc4fac6f552fb40a87bfc35ff18f44c45757c6e4 100644 (file)
@@ -106,12 +106,18 @@ use wcf\system\event\listener\ValueDumpListener;
 use wcf\system\foo\event\ValueAvailable;
 
 return static function (): void {
-    EventHandler::getInstance()->register(ValueAvailable::class, ValueDumpListener::class);
-
-    EventHandler::getInstance()->register(ValueAvailable::class, static function (ValueAvailable $event): void {
-        // For simple use cases a `Closure` instead of a class name may be used.
-        \var_dump($event->getValue());
-    });
+    EventHandler::getInstance()->register(
+        ValueAvailable::class,
+        ValueDumpListener::class
+    );
+
+    EventHandler::getInstance()->register(
+        ValueAvailable::class,
+        static function (ValueAvailable $event): void {
+            // For simple use cases a `Closure` instead of a class name may be used.
+            \var_dump($event->getValue());
+        }
+    );
 };
 ```