ValidationException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 14
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getErrors() 0 3 1
1
<?php
2
/*
3
 * This file is part of Yolk - Gamer Network's PHP Framework.
4
 *
5
 * Copyright (c) 2015 Gamer Network Ltd.
6
 * 
7
 * Distributed under the MIT License, a copy of which is available in the
8
 * LICENSE file that was bundled with this package, or online at:
9
 * https://github.com/gamernetwork/yolk-support
10
 */
11
12
namespace yolk\support\Exceptions;
13
14
class ValidationException extends \DomainException {
15
16
	protected $errors = [];
17
18
	public function __construct( array $errors, $source, \Exception $previous = null ) {
19
		parent::__construct("Validation Error: {$source}");
20
		$this->errors = $errors;
21
	}
22
23
	public function getErrors() {
24
		return $this->errors;
25
	}
26
27
}
28
29
// EOF