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

Commit

Permalink
Fixed test errors due to merge from master
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Oct 30, 2010
1 parent a63bfb9 commit 6c4437a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Paginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public static function factory($data, $adapter = self::INTERNAL_ADAPTER,
$adapter = 'null';
} else {
$type = (is_object($data)) ? get_class($data) : gettype($data);
throw new Exception('No adapter for type ' . $type);
throw new Exception\InvalidArgumentException('No adapter for type ' . $type);
}
}

Expand All @@ -215,15 +215,15 @@ public static function setAdapterBroker($broker)
{
if (is_string($broker)) {
if (!class_exists($broker)) {
throw new Exception(sprintf(
throw new Exception\InvalidArgumentException(sprintf(
'Unable to locate adapter broker of class "%s"',
$broker
));
}
$broker = new $broker();
}
if (!$broker instanceof AdapterBroker) {
throw new Exception(sprintf(
throw new Exception\InvalidArgumentException(sprintf(
'Pagination adapter broker must extend AdapterBroker; received "%s"',
(is_object($broker) ? get_class($broker) : gettype($broker))
));
Expand Down Expand Up @@ -323,15 +323,15 @@ public static function setScrollingStyleBroker($broker)
{
if (is_string($broker)) {
if (!class_exists($broker)) {
throw new Exception(sprintf(
throw new Exception\InvalidArgumentException(sprintf(
'Unable to locate scrolling style broker of class "%s"',
$broker
));
}
$broker = new $broker();
}
if (!$broker instanceof ScrollingStyleBroker) {
throw new Exception(sprintf(
throw new Exception\InvalidArgumentException(sprintf(
'Pagination scrolling-style broker must extend ScrollingStyleBroker; received "%s"',
(is_object($broker) ? get_class($broker) : gettype($broker))
));
Expand Down

0 comments on commit 6c4437a

Please sign in to comment.