Skip to content

Commit

Permalink
Cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
freost committed Jan 24, 2025
1 parent 205169d commit e63d26e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/mako/application/services/HumanizerService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class HumanizerService extends Service
*/
public function register(): void
{
$this->container->registerSingleton([Humanizer::class, 'humanizer'], static fn ($container) => new Humanizer($container->has(I18n::class) ? $container->get(I18n::class) : null));
$this->container->registerSingleton(
[Humanizer::class, 'humanizer'],
static fn ($container) => new Humanizer($container->has(I18n::class) ? $container->get(I18n::class) : null)
);
}
}
5 changes: 4 additions & 1 deletion src/mako/application/services/I18nService.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public function register(): void

// Register the I18n class

$this->container->registerSingleton([I18n::class, 'i18n'], static fn ($container) => new I18n(new Loader($container->get(FileSystem::class), "{$app->getPath()}/resources/i18n"), $app->getLanguage()));
$this->container->registerSingleton(
[I18n::class, 'i18n'],
static fn ($container) => new I18n(new Loader($container->get(FileSystem::class), "{$app->getPath()}/resources/i18n"), $app->getLanguage())
);
}
}
1 change: 0 additions & 1 deletion src/mako/application/web/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public function run(): void
if ($this->container->has(DeferredTasks::class)) {
if (function_exists('fastcgi_finish_request')) {
if ($this->container->has(Session::class)) {
/** @var Session $session */
$session = $this->container->get(Session::class);
$session->disableAutoCommit();
$session->commit();
Expand Down

0 comments on commit e63d26e

Please sign in to comment.