Code Duplication    Length = 9-11 lines in 5 locations

src/Compose.php 1 location

@@ 49-59 (lines=11) @@
46
     *
47
     * @return void
48
     */
49
    public function __construct()
50
    {
51
        $this->connect = new mysqli(
52
            getenv('DB_HOST'),
53
            getenv('DB_USER'),
54
            getenv('DB_PASSWORD'),
55
            getenv('DB_NAME')
56
        );
57
58
        $this->array = array();
59
    }
60
61
    /**
62
     * Fetch User from the DB

src/Login.php 1 location

@@ 51-61 (lines=11) @@
48
     *
49
     * @return void
50
     */
51
    public function __construct()
52
    {
53
        $this->flag = 0;
54
        $this->connect = new mysqli(
55
            getenv('DB_HOST'),
56
            getenv('DB_USER'),
57
            getenv('DB_PASSWORD'),
58
            getenv('DB_NAME')
59
        );
60
        $this->error = array();
61
    }
62
63
    /**
64
     * To Authenticate User Credentials

src/Reply.php 1 location

@@ 48-58 (lines=11) @@
45
     *
46
     * @return void
47
     */
48
    public function __construct()
49
    {
50
        $this->connect = new mysqli(
51
            getenv('DB_HOST'),
52
            getenv('DB_USER'),
53
            getenv('DB_PASSWORD'),
54
            getenv('DB_NAME')
55
        );
56
57
        date_default_timezone_set('Asia/Kolkata');
58
    }
59
60
    /**
61
     * Store Message in Db so as to send message to other members

src/User.php 1 location

@@ 51-59 (lines=9) @@
48
     *
49
     * @return void
50
     */
51
    public function __construct()
52
    {
53
        $this->connect = new mysqli(
54
            getenv('DB_HOST'),
55
            getenv('DB_USER'),
56
            getenv('DB_PASSWORD'),
57
            getenv('DB_NAME')
58
        );
59
    }
60
61
    /**
62
     * Getting User details on the basis of uername or login Id

src/Validate.php 1 location

@@ 49-57 (lines=9) @@
46
     *
47
     * @return void
48
     */
49
    public function __construct()
50
    {
51
        $this->connect = new mysqli(
52
            getenv('DB_HOST'),
53
            getenv('DB_USER'),
54
            getenv('DB_PASSWORD'),
55
            getenv('DB_NAME')
56
        );
57
    }
58
59
    /**
60
     * Validating Email in Database.