From 6e5599ce140d8d809dca13d038e8758350abb6d0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 2 Nov 2022 09:24:52 +0100 Subject: [PATCH] Shorten lines in bootstrap script example --- docs/migration/wsc55/php.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/migration/wsc55/php.md b/docs/migration/wsc55/php.md index 49bedd4f..bc4fac6f 100644 --- a/docs/migration/wsc55/php.md +++ b/docs/migration/wsc55/php.md @@ -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()); + } + ); }; ``` -- 2.20.1