Code Duplication    Length = 13-13 lines in 2 locations

src/Comodojo/Cache/Manager.php 1 location

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

src/Comodojo/SimpleCache/Manager.php 1 location

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