UpdateFailedException   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 60
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 1
A getTableName() 0 3 1
A getValues() 0 3 1
A getConditions() 0 3 1
1
<?php
2
3
namespace Wikibase\Database\Exception;
4
5
use Exception;
6
7
/**
8
 * @since 0.1
9
 * @licence GNU GPL v2+
10
 * @author Jeroen De Dauw < [email protected] >
11
 */
12
class UpdateFailedException extends QueryInterfaceException {
13
14
	/**
15
	 * @var string
16
	 */
17
	private $tableName;
18
19
	/**
20
	 * @var array
21
	 */
22
	private $values;
23
24
	/**
25
	 * @var array
26
	 */
27
	private $conditions;
28
29
	/**
30
	 * @param string $tableName
31
	 * @param array $values
32
	 * @param array $conditions
33
	 * @param string $message
34
	 * @param Exception $previous
35
	 */
36
	public function __construct(
37
		$tableName,
38
		array $values,
39
		array $conditions,
40
		$message = '',
41
		Exception $previous = null
42
	) {
43
		parent::__construct( $message, 0, $previous );
44
45
		$this->tableName = $tableName;
46
		$this->values = $values;
47
		$this->conditions = $conditions;
48
	}
49
50
	/**
51
	 * @return string
52
	 */
53
	public function getTableName() {
54
		return $this->tableName;
55
	}
56
57
	/**
58
	 * @return array
59
	 */
60
	public function getValues() {
61
		return $this->values;
62
	}
63
64
	/**
65
	 * @return array
66
	 */
67
	public function getConditions() {
68
		return $this->conditions;
69
	}
70
71
}
72