Code Duplication    Length = 7-7 lines in 2 locations

lib/elFinderVolumeBox.class.php 1 location

@@ 269-275 (lines=7) @@
266
            return ['exit' => true, 'body' => '{msg:errNetMountNoDriver}'];
267
        }
268
269
        if ($_aToken = $this->session->get('BoxTokens')) {
270
            $options['accessToken'] = json_encode($_aToken);
271
        } else {
272
            $this->setError(elFinder::ERROR_NETMOUNT, $options['host'], implode(' ', $this->error()));
273
274
            return ['exit' => true, 'error' => $this->error()];
275
        }
276
277
        $this->session->remove('nodeId');
278
        unset($options['user'], $options['pass'], $options['id']);

lib/elFinderVolumeOneDrive.class.php 1 location

@@ 279-285 (lines=7) @@
276
            return ['exit' => true, 'body' => '{msg:errNetMountNoDriver}'];
277
        }
278
279
        if ($_aToken = $this->session->get('OneDriveTokens')) {
280
            $options['accessToken'] = json_encode($_aToken);
281
        } else {
282
            $this->setError(elFinder::ERROR_NETMOUNT, $options['host'], implode(' ', $this->error()));
283
284
            return ['exit' => true, 'error' => $this->error()];
285
        }
286
287
        $this->session->remove('nodeId');
288
        unset($options['user'], $options['pass'], $options['id']);