Code Duplication    Length = 4-4 lines in 2 locations

src/Conversation.php 1 location

@@ 58-61 (lines=4) @@
55
                $login_id = (int)$fetch['login_id'];
56
57
                // Unique Identifier
58
                if($login_id > $userId)
59
                    $identifier = $userId.':'.$login_id;
60
                else
61
                    $identifier = $login_id.':'.$userId;
62
63
                $query = "SELECT total_messages from total_message where identifier = '$identifier'";
64
                if($result = $this->connect->query($query))

src/Reply.php 1 location

@@ 36-39 (lines=4) @@
33
            $identifier = $msg->name;
34
            $receiverID = $identifier;  //stores id of the person whom message is to be sent
35
36
            if($identifier > $userId)    // geneate specific unique code to store messages
37
                $identifier = $userId . ":" . $identifier;
38
            else
39
                $identifier = $identifier . ":" . $userId;
40
41
            $reply = addslashes(trim($msg->reply[0])); // stores the message sent by the user.
42