diff --git a/blog/.editorconfig b/blog/.editorconfig index 5e9a93ea..8802775b 100644 --- a/blog/.editorconfig +++ b/blog/.editorconfig @@ -10,6 +10,10 @@ indent_style = space indent_size = 4 trim_trailing_whitespace = true +[*.php] +ij_php_space_before_short_closure_left_parenthesis = false +ij_php_space_after_type_cast = true + [*.md] trim_trailing_whitespace = false diff --git a/blog/config/web/events.php b/blog/config/web/events.php index fffb00e9..7adccfda 100644 --- a/blog/config/web/events.php +++ b/blog/config/web/events.php @@ -3,10 +3,15 @@ declare(strict_types=1); use App\Timer; +use Yiisoft\Translator\TranslatorInterface; use Yiisoft\Yii\Http\Event\ApplicationStartup; +use Yiisoft\Yii\Middleware\Event\SetLocaleEvent; return [ ApplicationStartup::class => [ - static fn (Timer $timer) => $timer->start('overall'), + static fn(Timer $timer) => $timer->start('overall'), ], + SetLocaleEvent::class => [ + static fn(TranslatorInterface $translator, SetLocaleEvent $event) => $translator->setLocale($event->getLocale()), + ] ];