Fixed typo in Util\Collection

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

View File

@ -25,7 +25,7 @@ class Collection implements \IteratorAggregate, \Countable
public function add($element) public function add($element)
{ {
if ($this->class && !$element instanceof $this->class) { 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; $getter = $this->getter;