Code Duplication    Length = 11-12 lines in 3 locations

src/Conversation.php 1 location

@@ 22-33 (lines=12) @@
19
    protected $obTime;
20
    protected $obUser;
21
22
    public function __construct()
23
    {
24
        $this->connect = mysqli_connect(
25
            getenv('DB_HOST'),
26
            getenv('DB_USER'),
27
            getenv('DB_PASSWORD'),
28
            getenv('DB_NAME')
29
        );
30
        $this->obTime = new Time();
31
        $this->obUser = new User();
32
        $this->array = array();
33
    }
34
35
    public function conversationLoad($msg, $para)
36
    {

src/Search.php 1 location

@@ 20-30 (lines=11) @@
17
    protected $array;
18
    protected $obTime;
19
20
    public function __construct()
21
    {
22
        $this->connect = mysqli_connect(
23
            getenv('DB_HOST'),
24
            getenv('DB_USER'),
25
            getenv('DB_PASSWORD'),
26
            getenv('DB_NAME')
27
        );
28
        $this->obTime = new Time();
29
        $this->array = array();
30
    }
31
32
    public function searchItem($suggestion)
33
    {

src/SideBar.php 1 location

@@ 21-31 (lines=11) @@
18
    protected $array;
19
    protected $connect;
20
21
    public function __construct()
22
    {
23
        $this->connect = mysqli_connect(
24
            getenv('DB_HOST'),
25
            getenv('DB_USER'),
26
            getenv('DB_PASSWORD'),
27
            getenv('DB_NAME')
28
        );
29
        $this->obTime = new Time();
30
        $this->array = array();
31
    }
32
33
    public function loadSideBar($userId)
34
    {