[Cache] Fixing a coding standard, adding a small note for clarity, and adding a missing type-hint.
This commit is contained in:
parent
b3e998efa9
commit
769344733a
@ -227,6 +227,7 @@ class Cache implements HttpKernelInterface
|
||||
*/
|
||||
protected function lookup(Request $request)
|
||||
{
|
||||
// if allow_reload and no-cache Cache-Control, allow a cache reload
|
||||
if ($this->options['allow_reload'] && $request->isNoCache()) {
|
||||
$this->record($request, 'reload');
|
||||
|
||||
@ -275,7 +276,7 @@ class Cache implements HttpKernelInterface
|
||||
*
|
||||
* @return Response A Response instance
|
||||
*/
|
||||
protected function validate(Request $request, $entry)
|
||||
protected function validate(Request $request, Response $entry)
|
||||
{
|
||||
$subRequest = clone $request;
|
||||
|
||||
|
@ -108,8 +108,7 @@ class Store
|
||||
// find a cached entry that matches the request.
|
||||
$match = null;
|
||||
foreach ($entries as $entry) {
|
||||
if ($this->requestsMatch(isset($entry[1]['vary']) ? $entry[1]['vary'][0] : '', $request->headers->all(), $entry[0]))
|
||||
{
|
||||
if ($this->requestsMatch(isset($entry[1]['vary']) ? $entry[1]['vary'][0] : '', $request->headers->all(), $entry[0])) {
|
||||
$match = $entry;
|
||||
|
||||
break;
|
||||
|
Reference in New Issue
Block a user