AggregateException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 6
c 1
b 0
f 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 3
1
<?php
2
3
namespace BigFileTools\Driver;
4
5
class AggregateException extends Exception
6
{
7
	/**
8
	 * @var Exception[]
9
	 */
10
	public $exceptions;
11
12
	/**
13
	 * AggregateException constructor.
14
	 * @param string $message
15
	 * @param int $code
16
	 * @param Exception[] $exceptions
17
	 */
18
	public function __construct($message, $code, array $exceptions)
19
	{
20
		parent::__construct($message, $code, end($exceptions));
21
		reset($exceptions);
22
		$this->exceptions = $exceptions;
23
	}
24
25
	/**
26
	 * @return Exception[]
27
	 */
28
	public function getExceptions()
29
	{
30
		return $this->exceptions;
31
	}
32
}