Code Duplication    Length = 13-13 lines in 2 locations

src/Comodojo/Cache/Manager.php 1 location

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

src/Comodojo/SimpleCache/Manager.php 1 location

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