Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

Commit

Permalink
Fixed exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
svycka committed Nov 6, 2015
1 parent 6bf0ced commit b34def5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ServiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit b34def5

Please sign in to comment.