Test Failed
Branch master (e9d41f)
by Jean-Christophe
15:30
created

DatabaseMetadatas::getFieldsInfos()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 2
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 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.1
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
	public function getRowNum(string $tableName, string $pkName, string $condition): int {
35
		return $this->wrapperObject->getRowNum ( $tableName, $pkName, $condition );
36
	}
37
}
38
39