From 7d4e88c941c539fe586dd23aa918e545de0c7985 Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Sun, 24 Jul 2011 14:40:52 +0200 Subject: [PATCH] Fixed typo in Util\Collection --- Util/Collection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Util/Collection.php b/Util/Collection.php index e13703f..60b1256 100644 --- a/Util/Collection.php +++ b/Util/Collection.php @@ -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;