From 15dd7bd570bc57565910aeedb5b11daf62c9a101 Mon Sep 17 00:00:00 2001 From: Enzo Innocenzi Date: Mon, 2 Dec 2024 15:25:05 -0800 Subject: [PATCH] refactor(core): call invokable classes with `invoke` (#799) --- src/Tempest/Core/src/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Tempest/Core/src/Kernel.php b/src/Tempest/Core/src/Kernel.php index b44b7b8ae..eab0b2a1a 100644 --- a/src/Tempest/Core/src/Kernel.php +++ b/src/Tempest/Core/src/Kernel.php @@ -118,21 +118,21 @@ public function registerShutdownFunction(): self public function loadDiscoveryLocations(): self { - ($this->container->get(LoadDiscoveryLocations::class))(); + $this->container->invoke(LoadDiscoveryLocations::class); return $this; } public function loadDiscovery(): self { - ($this->container->get(LoadDiscoveryClasses::class))(); + $this->container->invoke(LoadDiscoveryClasses::class); return $this; } public function loadConfig(): self { - $this->container->get(LoadConfig::class)(); + $this->container->invoke(LoadConfig::class); return $this; } @@ -160,7 +160,7 @@ public function registerErrorHandler(): self public function finishDeferredTasks(): self { - ($this->container->get(FinishDeferredTasks::class))(); + $this->container->invoke(FinishDeferredTasks::class); return $this; }