Skip to content

Commit 8b132d7

Browse files
ACPT-1277
Fixing static test failures
1 parent 71da547 commit 8b132d7

File tree

1 file changed

+2
-5
lines changed
  • app/code/Magento/GraphQlCache/Controller/Plugin

1 file changed

+2
-5
lines changed

app/code/Magento/GraphQlCache/Controller/Plugin/GraphQl.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class GraphQl
5050
/**
5151
* @param CacheableQuery $cacheableQuery
5252
* @param Config $config
53+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
5354
* @param ResponseHttp $response @deprecated do not use
5455
* @param HttpRequestProcessor $requestProcessor
5556
* @param Registry $registry
@@ -103,12 +104,10 @@ public function afterRenderResult(ResultInterface $subject, ResultInterface $res
103104
/** @see \Magento\Framework\App\Http::launch */
104105
/** @see \Magento\PageCache\Model\Controller\Result\BuiltinPlugin::afterRenderResult */
105106
$this->registry->register('use_page_cache_plugin', true, true);
106-
107107
$cacheId = $this->cacheIdCalculator->getCacheId();
108108
if ($cacheId) {
109109
$response->setHeader(CacheIdCalculator::CACHE_ID_HEADER, $cacheId, true);
110110
}
111-
112111
if ($this->cacheableQuery->shouldPopulateCacheHeadersWithTags()) {
113112
$response->setPublicHeaders($this->config->getTtl());
114113
$response->setHeader('X-Magento-Tags', implode(',', $this->cacheableQuery->getCacheTags()), true);
@@ -118,11 +117,9 @@ public function afterRenderResult(ResultInterface $subject, ResultInterface $res
118117
} else {
119118
$sendNoCacheHeaders = true;
120119
}
121-
122120
if ($sendNoCacheHeaders) {
123-
$response->setNoCacheHeaders();
121+
$response->setNoCacheHeaders();
124122
}
125-
126123
return $result;
127124
}
128125
}

0 commit comments

Comments
 (0)