From 988c64ed228d6a6cbd1327f603572eb3d40a5ce7 Mon Sep 17 00:00:00 2001 From: fadrian06 Date: Fri, 14 Aug 2026 02:51:06 -0400 Subject: [PATCH] rename $containerInterfaceNS -> $containerFQCN and extract InvalidArgumentException $message argument --- flight/core/Dispatcher.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flight/core/Dispatcher.php b/flight/core/Dispatcher.php index f0de6c7..8cad2c5 100644 --- a/flight/core/Dispatcher.php +++ b/flight/core/Dispatcher.php @@ -50,17 +50,17 @@ class Dispatcher */ public function setContainerHandler($containerHandler): void { - $containerInterfaceNS = '\Psr\Container\ContainerInterface'; + $containerFQCN = '\\' . Container::class; - if (is_a($containerHandler, $containerInterfaceNS) || is_callable($containerHandler)) { + if (is_a($containerHandler, $containerFQCN) || is_callable($containerHandler)) { $this->containerHandler = $containerHandler; return; } - throw new InvalidArgumentException( - "\$containerHandler must be of type callable or instance $containerInterfaceNS" - ); + $message = "\$containerHandler must be of type callable or instance $containerFQCN"; + + throw new InvalidArgumentException($message); } public function setEngine(Engine $engine): void