Completed
Push — develop ( 23baee...f419bf )
by Michael
12s
created

ChainNoResult   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 30
ccs 3
cts 3
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getExceptions() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Teazee package.
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @license    MIT License
9
 */
10
namespace Teazee\Exception;
11
12
/**
13
 * @author Michael Crumm <[email protected]>
14
 */
15
class ChainNoResult extends NoResult
16
{
17
    /**
18
     * @var array
19
     */
20
    private $exceptions = [];
21
22
    /**
23
     * ChainNoResult constructor.
24
     *
25
     * @param string $message
26
     * @param array  $exceptions Array of Exception instances.
27
     */
28
    public function __construct($message, array $exceptions = [])
29
    {
30 2
        $this->exceptions = $exceptions;
31
32 2
        parent::__construct($message);
33
    }
34
35
    /**
36
     * Returns the exceptions from the chained providers.
37
     *
38
     * @return array
39
     */
40
    public function getExceptions()
41
    {
42 1
        return $this->exceptions;
43
    }
44
}
45