[Cache] Fixing a coding standard, adding a small note for clarity, and adding a missing type-hint.

This commit is contained in:
Ryan Weaver 2011-01-15 20:23:43 -06:00 committed by Fabien Potencier
parent b3e998efa9
commit 769344733a
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;