Test Failed
Pull Request — master (#5)
by Alexander
05:19 queued 02:02
created

PgSqlDriver   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
eloc 6
c 1
b 0
f 1
dl 0
loc 22
ccs 0
cts 7
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFullTableName() 0 3 1
A getTableName() 0 9 2
1
<?php namespace AgelxNash\Modx\Evo\Database\Drivers;
2
3
use AgelxNash\Modx\Evo\Database\Exceptions;
4
use mysqli;
5
use mysqli_result;
6
use mysqli_sql_exception;
7
use mysqli_driver;
8
use ReflectionClass;
9
10
/**
11
 * @property mysqli $conn
12
 */
13
class PgSqlDriver extends IlluminateDriver
14
{
15
    /**
16
     * {@inheritDoc}
17
     */
18
    public function getTableName($table, $escape = true)
19
    {
20
        if (empty($table)) {
21
            throw new Exceptions\TableNotDefinedException($table);
22
        }
23
24
        $out = $this->getConfig('prefix') . $table;
25
26
        return $out;
27
    }
28
29
    /**
30
     * {@inheritDoc}
31
     */
32
    public function getFullTableName($table)
33
    {
34
        return $this->getTableName($table);
35
    }
36
}
37