Code Duplication    Length = 9-9 lines in 2 locations

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

class/CategoryHandler.php 1 location

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