Code Duplication    Length = 6-6 lines in 2 locations

src/plugins/onTick/evemails.php 1 location

@@ 120-125 (lines=6) @@
117
        setPermCache('mailLastChecked', $nextKey);
118
119
        //Set cache timer for api key
120
        if ($cacheClr <= time()) {
121
            $weirdTime = time() + 1830;
122
            setPermCache("mailLastChecked{$keyID}", $weirdTime);
123
        } else {
124
            setPermCache("mailLastChecked{$keyID}", $cacheClr);
125
        }
126
127
        // If there is no data, just quit..
128
        if (empty($data['result']['rowset']['row'])) {

src/plugins/onTick/notifications.php 1 location

@@ 132-137 (lines=6) @@
129
            $nextKeyTime = gmdate('Y-m-d H:i:s', $nextKey);
130
            setPermCache('notificationsLastChecked', $nextKey);
131
            //Set cache timer for api key
132
            if ($cacheClr <= time()) {
133
                $weirdTime = time() + 1830;
134
                setPermCache("notificationsLastChecked{$keyID}", $weirdTime);
135
            } else {
136
                setPermCache("notificationsLastChecked{$keyID}", $cacheClr);
137
            }
138
            $data = json_decode(json_encode(simplexml_load_string(downloadData($url),
139
                'SimpleXMLElement', LIBXML_NOCDATA)), true);
140
            // If there is no data, just quit..