Code Duplication    Length = 6-6 lines in 2 locations

include/classes/mysqlims.class.php 2 locations

@@ 27-32 (lines=6) @@
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
            }
33
        } else {
34
            $this->mysqliW = new mysqli($main['host'],
35
                $main['user'], $main['pass'],
@@ 37-42 (lines=6) @@
34
            $this->mysqliW = new mysqli($main['host'],
35
                $main['user'], $main['pass'],
36
                $main['name'], $main['port']);
37
            if ($slave && is_array($slave) && isset($slave['enabled']) && $slave['enabled']
38
                === true) {
39
                $this->mysqliR = new mysqli($slave['host'],
40
                    $slave['user'], $slave['pass'],
41
                    $slave['name'], $slave['port']);
42
            }
43
        }
44
45
        if ($this->mysqliW->connect_errno) {