Code Duplication    Length = 7-7 lines in 2 locations

include/classes/mysqlims.class.php 2 locations

@@ 27-33 (lines=7) @@
24
            $this->mysqliW = new mysqli_strict($main['host'],
25
                $main['user'], $main['pass'],
26
                $main['name'], $main['port']);
27
            if ($slave && is_array($slave) && isset($slave['enabled']) && $slave['enabled']
28
                === true) {
29
                $this->mysqliR = new mysqli_strict($slave['host'],
30
                    $slave['user'], $slave['pass'],
31
                    $slave['name'], $slave['port']);
32
                $this->slave = true;
33
            }
34
        } else {
35
            $this->mysqliW = new mysqli($main['host'],
36
                $main['user'], $main['pass'],
@@ 38-44 (lines=7) @@
35
            $this->mysqliW = new mysqli($main['host'],
36
                $main['user'], $main['pass'],
37
                $main['name'], $main['port']);
38
            if ($slave && is_array($slave) && isset($slave['enabled']) && $slave['enabled']
39
                === true) {
40
                $this->mysqliR = new mysqli($slave['host'],
41
                    $slave['user'], $slave['pass'],
42
                    $slave['name'], $slave['port']);
43
                $this->slave = true;
44
            }
45
        }
46
47
        if ($this->mysqliW->connect_errno) {