Code Duplication    Length = 3-5 lines in 2 locations

lib/elFinder.class.php 2 locations

@@ 2552-2556 (lines=5) @@
2549
2550
        $result = [];
2551
2552
        if (($volume = $this->volume($targets[0])) == false) {
2553
            $result['error'] = $this->error(self::ERROR_CONF_NO_VOL);
2554
2555
            return $result;
2556
        }
2557
2558
        $this->itemLock($targets);
2559
@@ 3166-3168 (lines=3) @@
3163
        $targets = isset($args['targets']) && is_array($args['targets']) ? $args['targets'] : [];
3164
        $name = isset($args['name']) ? $args['name'] : '';
3165
3166
        if (($volume = $this->volume($targets[0])) == false) {
3167
            return $this->error(self::ERROR_ARCHIVE, self::ERROR_TRGDIR_NOT_FOUND);
3168
        }
3169
3170
        foreach ($targets as $target) {
3171
            $this->itemLock($target);