Skip to content

Commit

Permalink
Rename variable to $overwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
mpdude committed May 19, 2020
1 parent 6726bac commit 60512dc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Symfony/Component/HttpKernel/HttpCache/Store.php
Expand Up @@ -180,7 +180,7 @@ public function write(Request $request, Response $response)
$digest = $this->generateContentDigest($response);
$response->headers->set('X-Content-Digest', $digest);

if (!$this->save($digest, $response->getContent(), true)) {
if (!$this->save($digest, $response->getContent(), false)) {
throw new \RuntimeException('Unable to store the entity.');
}

Expand Down Expand Up @@ -358,17 +358,17 @@ private function load($key)
/**
* Save data for the given key.
*
* @param string $key The store key
* @param string $data The data to store
* @param bool $noOverwriteIfExists Don't overwrite data if the key already exists
* @param string $key The store key
* @param string $data The data to store
* @param bool $overwrite Whether existing data should be overwritten
*
* @return bool
*/
private function save($key, $data, $noOverwriteIfExists = false)
private function save($key, $data, $overwrite = true)
{
$path = $this->getPath($key);

if ($noOverwriteIfExists && file_exists($path)) {
if (!$overwrite && file_exists($path)) {
return true;
}

Expand Down

0 comments on commit 60512dc

Please sign in to comment.