Code Duplication    Length = 10-10 lines in 2 locations

htdocs/lib2/logic/picture.class.php 2 locations

@@ 411-420 (lines=10) @@
408
    /**
409
     * @return string
410
     */
411
    public function getCacheId()
412
    {
413
        if ($this->getObjectType() == OBJECT_CACHELOG) {
414
            return sql_value("SELECT `cache_id` FROM `cache_logs` WHERE `id`='&1'", false, $this->getObjectId());
415
        } elseif ($this->getObjectType() == OBJECT_CACHE) {
416
            return $this->getObjectId();
417
        } else {
418
            return false;
419
        }
420
    }
421
422
    /**
423
     * @return mixed
@@ 459-468 (lines=10) @@
456
    /**
457
     * @return bool|mixed
458
     */
459
    public function getUserId()
460
    {
461
        if ($this->getObjectType() == OBJECT_CACHE) {
462
            return sql_value(
463
                "SELECT `caches`.`user_id` FROM `caches` WHERE `caches`.`cache_id`='&1'",
464
                false,
465
                $this->getObjectId()
466
            );
467
        } elseif ($this->getObjectType() == OBJECT_CACHELOG) {
468
            return sql_value(
469
                "SELECT `cache_logs`.`user_id` FROM `cache_logs` WHERE `cache_logs`.`id`='&1'",
470
                false,
471
                $this->getObjectId()