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

ChainNoResult::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
ccs 2
cts 2
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
crap 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