Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 352-361 (lines=10) @@
349
    /**
350
     * @return string
351
     */
352
    public function getCacheId()
353
    {
354
        if ($this->getObjectType() == OBJECT_CACHELOG) {
355
            return sql_value("SELECT `cache_id` FROM `cache_logs` WHERE `id`='&1'", false, $this->getObjectId());
356
        } elseif ($this->getObjectType() == OBJECT_CACHE) {
357
            return $this->getObjectId();
358
        } else {
359
            return false;
360
        }
361
    }
362
363
    public function getObjectId()
364
    {
@@ 383-392 (lines=10) @@
380
        return $this->rePicture->setValue('object_type', $value + 0);
381
    }
382
383
    public function getUserId()
384
    {
385
        if ($this->getObjectType() == OBJECT_CACHE) {
386
            return sql_value(
387
                "SELECT `caches`.`user_id` FROM `caches` WHERE `caches`.`cache_id`='&1'",
388
                false,
389
                $this->getObjectId()
390
            );
391
        } elseif ($this->getObjectType() == OBJECT_CACHELOG) {
392
            return sql_value(
393
                "SELECT `cache_logs`.`user_id` FROM `cache_logs` WHERE `cache_logs`.`id`='&1'",
394
                false,
395
                $this->getObjectId()