Code Duplication    Length = 6-6 lines in 2 locations

lib/elFinderSession.php 2 locations

@@ 148-153 (lines=6) @@
145
        }
146
147
        list($cat, $name) = array_pad(explode('.', $key, 2), 2, null);
148
        if (is_null($name)) {
149
            if (! isset($this->keys[$cat])) {
150
                $name = $cat;
151
                $cat = 'default';
152
            }
153
        }
154
        if (isset($this->keys[$cat])) {
155
            $cat = $this->keys[$cat];
156
        } else {
@@ 180-185 (lines=6) @@
177
        $session = null;
178
        if ($this->started) {
179
            list($cat, $name) = array_pad(explode('.', $key, 2), 2, null);
180
            if (is_null($name)) {
181
                if (! isset($this->keys[$cat])) {
182
                    $name = $cat;
183
                    $cat = 'default';
184
                }
185
            }
186
            if (isset($this->keys[$cat])) {
187
                $cat = $this->keys[$cat];
188
            } else {