Skip to content

Commit

Permalink
Remove add/setException methods. Remove @access/@return annotations.
Browse files Browse the repository at this point in the history
Move $exceptions property above methods.
  • Loading branch information
Ben Glassman committed Sep 16, 2013
1 parent 8ab27f6 commit 7e90be6
Showing 1 changed file with 9 additions and 41 deletions.
50 changes: 9 additions & 41 deletions src/Geocoder/Exception/ChainNoResultException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

}

0 comments on commit 7e90be6

Please sign in to comment.