diff --git a/src/ServiceManager.php b/src/ServiceManager.php index 87760405..4b503e21 100644 --- a/src/ServiceManager.php +++ b/src/ServiceManager.php @@ -226,7 +226,7 @@ public function setInvokableClass($name, $invokableClass, $shared = null) if ($this->allowOverride === false) { throw new Exception\InvalidServiceNameException(sprintf( 'A service by the name or alias "%s" already exists and cannot be overridden; please use an alternate name', - $cName + $name )); } $this->unregisterService($cName); @@ -266,7 +266,7 @@ public function setFactory($name, $factory, $shared = null) if ($this->allowOverride === false) { throw new Exception\InvalidServiceNameException(sprintf( 'A service by the name or alias "%s" already exists and cannot be overridden, please use an alternate name', - $cName + $name )); } $this->unregisterService($cName);