Code Duplication    Length = 13-13 lines in 2 locations

src/Comodojo/Cache/Manager.php 1 location

@@ 166-178 (lines=13) @@
163
164
    protected function selectFrom($mode, $key) {
165
166
        if ( $this->pick_mode < 5 ) {
167
168
            $result = $this->fromSingleProvider($mode, $key);
169
170
        } else if ( $this->pick_mode == 5 ) {
171
172
            $result = $this->fromAllProviders($mode, $key);
173
174
        } else {
175
176
            $result = $this->traverse($mode, $key);
177
178
        }
179
180
        return $result;
181

src/Comodojo/SimpleCache/Manager.php 1 location

@@ 208-220 (lines=13) @@
205
206
    protected function selectFrom($mode, $key, $default=null) {
207
208
        if ( $this->pick_mode < 5 ) {
209
210
            $result = $this->fromSingleProvider($mode, $key, $default);
211
212
        } else if ( $this->pick_mode == 5 ) {
213
214
            $result = $this->fromAllProviders($mode, $key, $default);
215
216
        } else {
217
218
            $result = $this->traverse($mode, $key, $default);
219
220
        }
221
222
        return $result;
223