Code Duplication    Length = 13-13 lines in 2 locations

src/Comodojo/Cache/Manager.php 1 location

@@ 140-152 (lines=13) @@
137
138
    protected function selectFrom($mode, $key) {
139
140
        if ( $this->pick_mode < 5 ) {
141
142
            $result = $this->fromSingleProvider($mode, $key);
143
144
        } else if ( $this->pick_mode == 5 ) {
145
146
            $result = $this->fromAllProviders($mode, $key);
147
148
        } else {
149
150
            $result = $this->traverse($mode, $key);
151
152
        }
153
154
        return $result;
155

src/Comodojo/SimpleCache/Manager.php 1 location

@@ 179-191 (lines=13) @@
176
177
    protected function selectFrom($mode, $key, $default=null) {
178
179
        if ( $this->pick_mode < 5 ) {
180
181
            $result = $this->fromSingleProvider($mode, $key, $default);
182
183
        } else if ( $this->pick_mode == 5 ) {
184
185
            $result = $this->fromAllProviders($mode, $key, $default);
186
187
        } else {
188
189
            $result = $this->traverse($mode, $key, $default);
190
191
        }
192
193
        return $result;
194