Test Failed
Pull Request — master (#97)
by Gildonei
03:38
created

DatabaseMetadatas   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
eloc 5
c 2
b 0
f 0
dl 0
loc 16
ccs 8
cts 8
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getForeignKeys() 0 2 1
A getTablesName() 0 2 1
A getFieldsInfos() 0 2 1
A getPrimaryKeys() 0 2 1
1
<?php
2
3
namespace Ubiquity\db\traits;
4
5
/**
6
 * Retreives metadatas from the database.
7
 *
8
 * Ubiquity\db\traits$DatabaseMetadatas
9
 * This class is part of Ubiquity
10
 *
11
 * @author jcheron <[email protected]>
12
 * @version 1.0.0
13
 *
14
 * @property \Ubiquity\db\providers\AbstractDbWrapper $wrapperObject
15
 */
16
trait DatabaseMetadatas {
17
18 4
	public function getTablesName() {
19 4
		return $this->wrapperObject->getTablesName ();
20
	}
21
22 1
	public function getPrimaryKeys($tableName) {
23 1
		return $this->wrapperObject->getPrimaryKeys ( $tableName );
24
	}
25
26 1
	public function getFieldsInfos($tableName) {
27 1
		return $this->wrapperObject->getFieldsInfos ( $tableName );
28
	}
29
30 1
	public function getForeignKeys($tableName, $pkName, $dbName = null) {
31 1
		return $this->wrapperObject->getForeignKeys ( $tableName, $pkName, $dbName );
32
	}
33
}
34
35