Code Duplication    Length = 6-6 lines in 2 locations

include/classes/mysqlims.class.php 2 locations

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