Code Duplication    Length = 3-3 lines in 2 locations

lib/elFinderVolumeDropbox2.class.php 1 location

@@ 546-548 (lines=3) @@
543
                return $this->setError('Required option "app_secret" is undefined.');
544
            }
545
        }
546
        if (isset($this->options['tokens']) && is_array($this->options['tokens']) && ! empty($this->options['tokens']['access_token'])) {
547
            $this->options['access_token'] = $this->options['tokens']['access_token'];
548
        }
549
        if (! $this->options['access_token']) {
550
            return $this->setError('Required option "access_token" or "refresh_token" is undefined.');
551
        }

lib/elFinderVolumeGoogleDrive.class.php 1 location

@@ 402-404 (lines=3) @@
399
    public function debug()
400
    {
401
        $res = parent::debug();
402
        if (empty($this->options['refresh_token']) && $this->options['access_token'] && isset($this->options['access_token']['refresh_token'])) {
403
            $res['refresh_token'] = $this->options['access_token']['refresh_token'];
404
        }
405
406
        return $res;
407
    }