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

PgSqlDriver::getTableName()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
c 1
b 0
f 1
dl 0
loc 9
ccs 0
cts 5
cp 0
rs 10
cc 2
nc 2
nop 2
crap 6
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