Skip to content

Commit 7e90be6

Browse files
author
Ben Glassman
committed
Remove add/setException methods. Remove @access/@return annotations.
Move $exceptions property above methods.
1 parent 8ab27f6 commit 7e90be6

File tree

1 file changed

+9
-41
lines changed

1 file changed

+9
-41
lines changed

src/Geocoder/Exception/ChainNoResultException.php

Lines changed: 9 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -17,62 +17,30 @@ class ChainNoResultException extends NoResultException
1717
{
1818

1919
/**
20-
* Constructor
21-
*
22-
* @param string $message
23-
* @param array $exceptions Array of Exception instances
24-
* @access public
25-
* @return void
26-
*/
27-
public function __construct($message = "", array $exceptions = array())
28-
{
29-
parent::__construct($message);
30-
$this->setExceptions($exceptions);
31-
}
32-
33-
/**
34-
* exceptions
20+
* Exceptions from chained providers
3521
*
3622
* @var array
37-
* @access private
3823
*/
3924
private $exceptions = array();
4025

4126
/**
42-
* Get the exceptions
43-
*
44-
* @access public
45-
* @return void
46-
*/
47-
public function getExceptions()
48-
{
49-
return $this->exceptions;
50-
}
51-
52-
/**
53-
* Set the exceptions
27+
* Constructor
5428
*
29+
* @param string $message
5530
* @param array $exceptions Array of Exception instances
56-
* @access public
57-
* @return void
5831
*/
59-
public function setExceptions(array $exceptions)
32+
public function __construct($message = "", array $exceptions = array())
6033
{
61-
foreach ($exceptions as $exception) {
62-
$this->addException($exception);
63-
}
34+
parent::__construct($message);
35+
$this->exceptions = $exceptions;
6436
}
6537

6638
/**
67-
* Add an exception
68-
*
69-
* @param Exception $exception
70-
* @access public
71-
* @return void
39+
* Get the exceptions from chained providers
7240
*/
73-
public function addException(\Exception $exception)
41+
public function getExceptions()
7442
{
75-
$this->exceptions[] = $exception;
43+
return $this->exceptions;
7644
}
7745

7846
}

0 commit comments

Comments
 (0)