Code Duplication    Length = 10-12 lines in 2 locations

models/Notification.php 1 location

@@ 83-94 (lines=12) @@
80
     * @param  string       $status    The status of the notification (unread, read, deleted)
81
     * @return Notification An object representing the notification that was just entered
82
     */
83
    public static function newNotification($receiver, $type, $event, $timestamp = "now", $status = "unread")
84
    {
85
        $notification = self::create(array(
86
            "receiver"  => $receiver,
87
            "type"      => $type,
88
            "event"     => serialize($event),
89
            "timestamp" => TimeDate::from($timestamp)->toMysql(),
90
            "status"    => $status
91
        ), 'issss');
92
93
        return $notification;
94
    }
95
96
    /**
97
     * Show a list of notifications for a specific user

models/ConversationEvent.php 1 location

@@ 78-87 (lines=10) @@
75
     * @param  string     $status    The status of the event, can be 'visible', 'hidden', 'deleted' or 'reported'
76
     * @return ConversationEvent
77
     */
78
    public static function storeEvent($conversation, $event, $type, $timestamp = 'now', $status = 'visible')
79
    {
80
        return self::create(array(
81
            "conversation_to" => $conversation,
82
            "message"         => serialize($event),
83
            "event_type"      => $type,
84
            "timestamp"       => TimeDate::from($timestamp)->toMysql(),
85
            "status"          => $status
86
        ), 'issss');
87
    }
88
89
    /**
90
     * Get a query builder for events