Code Duplication    Length = 13-13 lines in 2 locations

src/Comodojo/Cache/Manager.php 1 location

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

src/Comodojo/SimpleCache/Manager.php 1 location

@@ 198-210 (lines=13) @@
195
196
    protected function selectFrom($mode, $key, $default=null) {
197
198
        if ( $this->pick_mode < 5 ) {
199
200
            $result = $this->fromSingleProvider($mode, $key, $default);
201
202
        } else if ( $this->pick_mode == 5 ) {
203
204
            $result = $this->fromAllProviders($mode, $key, $default);
205
206
        } else {
207
208
            $result = $this->traverse($mode, $key, $default);
209
210
        }
211
212
        return $result;
213