Fixed typo in Util\Collection

This commit is contained in:
Francis Besset 2011-07-24 14:40:52 +02:00
parent fd7fcf215b
commit 7d4e88c941
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class Collection implements \IteratorAggregate, \Countable
public function add($element)
{
if ($this->class && !$element instanceof $this->class) {
throw new \InvalidArgument(sprintf('Cannot add class "%s" because it is not an instance of "%s"', get_class($element), $class));
throw new \InvalidArgumentException(sprintf('Cannot add class "%s" because it is not an instance of "%s"', get_class($element), $this->class));
}
$getter = $this->getter;