diff --git a/src/Geocoder/Exception/ChainNoResultException.php b/src/Geocoder/Exception/ChainNoResultException.php index edf18af42..c4475d227 100644 --- a/src/Geocoder/Exception/ChainNoResultException.php +++ b/src/Geocoder/Exception/ChainNoResultException.php @@ -17,62 +17,30 @@ class ChainNoResultException extends NoResultException { /** - * Constructor - * - * @param string $message - * @param array $exceptions Array of Exception instances - * @access public - * @return void - */ - public function __construct($message = "", array $exceptions = array()) - { - parent::__construct($message); - $this->setExceptions($exceptions); - } - - /** - * exceptions + * Exceptions from chained providers * * @var array - * @access private */ private $exceptions = array(); /** - * Get the exceptions - * - * @access public - * @return void - */ - public function getExceptions() - { - return $this->exceptions; - } - - /** - * Set the exceptions + * Constructor * + * @param string $message * @param array $exceptions Array of Exception instances - * @access public - * @return void */ - public function setExceptions(array $exceptions) + public function __construct($message = "", array $exceptions = array()) { - foreach ($exceptions as $exception) { - $this->addException($exception); - } + parent::__construct($message); + $this->exceptions = $exceptions; } /** - * Add an exception - * - * @param Exception $exception - * @access public - * @return void + * Get the exceptions from chained providers */ - public function addException(\Exception $exception) + public function getExceptions() { - $this->exceptions[] = $exception; + return $this->exceptions; } }