Completed
Push — master ( fac124...ff4c77 )
by Márk
10s
created

DiscoveryFailedException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 66.67%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 25
rs 10
ccs 4
cts 6
cp 0.6667

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getExceptions() 0 4 1
1
<?php
2
3
namespace Http\Discovery\Exception;
4
5
/**
6
 * Thrown when all discovery strategies fails to find a resource.
7
 *
8
 * @author Tobias Nyholm <[email protected]>
9
 */
10
final class DiscoveryFailedException extends \Exception
11
{
12
    /**
13
     * @var array
14
     */
15
    private $exceptions;
16
17
    /**
18
     * @param $exceptions
19
     */
20 6
    public function __construct($message, array $exceptions = [])
21
    {
22 6
        $this->exceptions = $exceptions;
23
24 6
        parent::__construct($message, 0, array_shift($exceptions));
25 6
    }
26
27
    /**
28
     * @return array
29
     */
30
    public function getExceptions()
31
    {
32
        return $this->exceptions;
33
    }
34
}
35