Completed
Push — master ( 76c71b...91372c )
by dima
05:24
created

ValidationException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 16
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getFailures() 0 3 1
1
<?php
2
3
namespace Frameworkless\Exceptions;
4
5
/**
6
 * Description of Exception
7
 *
8
 * @author Dmitriy
9
 */
10
class ValidationException extends \Exception {
11
12
	private $failures;
13
14
	public function __construct($failures, $message = "", $code = 0, $previous = null) {
15
		
16
		parent::__construct($message, $code, $previous);
17
		
18
		$this->failures = $failures;
19
	}
20
21
	function getFailures() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
22
		return $this->failures;
23
	}
24
25
}
26