Code Duplication    Length = 5-5 lines in 3 locations

lib/elFinderVolumeBox.class.php 1 location

@@ 209-213 (lines=5) @@
206
                    $cdata = '';
207
                    $innerKeys = ['cmd', 'host', 'options', 'pass', 'protocol', 'user'];
208
                    $this->ARGS = $_SERVER['REQUEST_METHOD'] === 'POST' ? $_POST : $_GET;
209
                    foreach ($this->ARGS as $k => $v) {
210
                        if (! in_array($k, $innerKeys)) {
211
                            $cdata .= '&'.$k.'='.rawurlencode($v);
212
                        }
213
                    }
214
                    if (empty($options['url'])) {
215
                        $options['url'] = elFinder::getConnectorUrl();
216
                    }

lib/elFinderVolumeDropbox.class.php 1 location

@@ 191-195 (lines=5) @@
188
                    $cdata = '';
189
                    $innerKeys = ['cmd', 'host', 'options', 'pass', 'protocol', 'user'];
190
                    $this->ARGS = $_SERVER['REQUEST_METHOD'] === 'POST' ? $_POST : $_GET;
191
                    foreach ($this->ARGS as $k => $v) {
192
                        if (! in_array($k, $innerKeys)) {
193
                            $cdata .= '&'.$k.'='.rawurlencode($v);
194
                        }
195
                    }
196
                    if (strpos($options['url'], 'http') !== 0) {
197
                        $options['url'] = elFinder::getConnectorUrl();
198
                    }

lib/elFinderVolumeOneDrive.class.php 1 location

@@ 210-214 (lines=5) @@
207
                    $cdata = '';
208
                    $innerKeys = ['cmd', 'host', 'options', 'pass', 'protocol', 'user'];
209
                    $this->ARGS = $_SERVER['REQUEST_METHOD'] === 'POST' ? $_POST : $_GET;
210
                    foreach ($this->ARGS as $k => $v) {
211
                        if (! in_array($k, $innerKeys)) {
212
                            $cdata .= '&'.$k.'='.rawurlencode($v);
213
                        }
214
                    }
215
                    if (empty($options['url'])) {
216
                        $options['url'] = elFinder::getConnectorUrl();
217
                    }