Driver::isSqlite()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 1
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 6
rs 10
1
<?php
2
3
namespace CodexShaper\DBM\Database\Drivers;
4
5
class Driver
6
{
7
    /**
8
     * Get connection name.
9
     *
10
     * @return string
11
     */
12
    public function getConnectionName()
13
    {
14
        return config('database.default', 'mysql');
15
    }
16
17
    /**
18
     * Check driver is MongoDB.
19
     *
20
     * @return bool
21
     */
22
    public function isMongoDB()
23
    {
24
        return (config('database.default') == 'mongodb') ? true : false;
25
    }
26
27
    /**
28
     * Check driver is Mysql.
29
     *
30
     * @return bool
31
     */
32
    public function isMysql()
33
    {
34
        return (config('database.default') == 'mysql') ? true : false;
35
    }
36
37
    /**
38
     * Check driver is Postgresql.
39
     *
40
     * @return bool
41
     */
42
    public function isPostgresql()
43
    {
44
        return (config('database.default') == 'pgsql') ? true : false;
45
    }
46
47
    /**
48
     * Check driver is Sqlsrv.
49
     *
50
     * @return bool
51
     */
52
    public function isSqlsrv()
53
    {
54
        return (config('database.default') == 'sqlsrv') ? true : false;
55
    }
56
57
    /**
58
     * Check driver is Sqlite.
59
     *
60
     * @return bool
61
     */
62
    public function isSqlite()
63
    {
64
        return (config('database.default') == 'sqlite') ? true : false;
65
    }
66
}
67