DatabaseException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
/*
3
 * This file is part of Yolk - Gamer Network's PHP Framework.
4
 *
5
 * Copyright (c) 2013 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
10
 */
11
12
namespace yolk\database\exceptions;
13
14
/**
15
 * Base database exception.
16
 */
17
class DatabaseException extends \Exception {
18
19
	/**
20
	 * https://bugs.php.net/bug.php?id=51742
21
	 * @var integer|string
22
	 */
23
	protected $code;
24
25
	public function __construct( $message = 'An unknown database error occured', $code = 0, \Exception $previous = null ) {
26
		parent::__construct($message, (int) $code, $previous);
27
		$this->code = $code;
28
	}
29
30
}
31
32
// EOF
33