Completed
Push — master ( 0ef921...49b538 )
by Martijn
03:08
created

StatementException::getStatement()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace SwaggerGen;
4
5
/**
6
 * Exception class that can take a Statement
7
 *
8
 * @package    SwaggerGen
9
 * @author     Martijn van der Lee <[email protected]>
10
 * @copyright  2016 Martijn van der Lee
11
 * @license    https://opensource.org/licenses/MIT MIT
12
 */
13
class StatementException extends \Exception
14
{
15
16
	/**
17
	 * @var \SwaggerGen\Statement
18
	 */
19
	private $statement = null;
20
21
	/**
22
	 * 
23
	 * @param string $message
24
	 * @param int $code
25
	 * @param \Throwable $previous
26
	 * @param \SwaggerGen\Statement $statement
27
	 */
28
	public function __construct($message = "", $code = 0, $previous = null, $statement = null)
29
	{
30
		$this->statement = $statement;
31
32
		parent::__construct($message, $code, $previous);
33
	}
34
	
35
	public function getStatement() {
36
		return $this->statement;
37
	}
38
39
}
40