From b34def5300b8adc7c4507d8d327f3d5e1022f604 Mon Sep 17 00:00:00 2001 From: Vytautas Stankus Date: Fri, 6 Nov 2015 15:53:16 +0200 Subject: [PATCH] Fixed exception message --- src/ServiceManager.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ServiceManager.php b/src/ServiceManager.php index 898cbc57..fe0327fc 100644 --- a/src/ServiceManager.php +++ b/src/ServiceManager.php @@ -276,9 +276,10 @@ public function setFactory($name, $factory, $shared = null) $cName = $this->canonicalizeName($name); if (!($factory instanceof FactoryInterface || is_string($factory) || is_callable($factory))) { - throw new Exception\InvalidArgumentException( - 'Provided abstract factory must be the class name of an abstract factory or an instance of an AbstractFactoryInterface.' - ); + throw new Exception\InvalidArgumentException(sprintf( + 'Provided factory must be the class name of an factory, callable or an instance of an "%s".', + FactoryInterface::class + )); } if ($this->has([$cName, $name], false)) {