Code Duplication    Length = 9-9 lines in 2 locations

class/CategoryHandler.php 1 location

@@ 34-42 (lines=9) @@
31
     * @param null|int $time
32
     * @return mixed
33
     */
34
    public function updateDateupdated($cid = 0, $time = null)
35
    {
36
        // Если не передали время
37
        $time = null === $time ? time() : (int)$time;
38
        //
39
        $sql = sprintf('UPDATE `%s` SET `dateupdated` = %u WHERE `cid` = %u', $this->table, $time, (int)$cid);
40
        //
41
        return $this->db->query($sql);
42
    }
43
}
44

class/InstructionHandler.php 1 location

@@ 32-40 (lines=9) @@
29
     * @param bool|int $time
30
     * @return mixed
31
     */
32
    public function updateDateupdated($instrid = 0, $time = null)
33
    {
34
        // Если не передали время
35
        $time = null === $time ? time() : (int)$time;
36
        //
37
        $sql = sprintf('UPDATE `%s` SET `dateupdated` = %u WHERE `instrid` = %u', $this->table, $time, (int)$instrid);
38
        //
39
        return $this->db->query($sql);
40
    }
41
42
    // Обновление числа страниц
43