Code Duplication    Length = 10-13 lines in 2 locations

src/Guzzle/Plugin/Cache/CachePlugin.php 2 locations

@@ 175-187 (lines=13) @@
172
            return;
173
        }
174
175
        if ($response = $this->storage->fetch($request)) {
176
            $response->setHeader(
177
                'Age',
178
                time() - strtotime($response->getLastModified() ? : $response->getDate() ?: 'now')
179
            );
180
181
            if ($this->canResponseSatisfyFailedRequest($request, $response)) {
182
                $request->getParams()->set('cache.hit', 'error');
183
                $this->addResponseHeaders($request, $response);
184
                $event['response'] = $response;
185
                $event->stopPropagation();
186
            }
187
        }
188
    }
189
190
    /**
@@ 208-217 (lines=10) @@
205
            return;
206
        }
207
208
        if ($response = $this->storage->fetch($request)) {
209
            $response->setHeader('Age', time() - strtotime($response->getDate() ? : 'now'));
210
            if (!$this->canResponseSatisfyFailedRequest($request, $response)) {
211
                return;
212
            }
213
            $request->getParams()->set('cache.hit', 'error');
214
            $request->setResponse($response);
215
            $this->addResponseHeaders($request, $response);
216
            $event->stopPropagation();
217
        }
218
    }
219
220
    /**