Skip to content

Commit 14d7ebf

Browse files
committed
Merge pull request #771 from jordi12100/patch-1
Remove unused parameter $storageFile in unlock method
2 parents bc2f602 + b98f713 commit 14d7ebf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Google/Cache/File.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ public function get($key, $expiration = false)
7373
if ($this->acquireReadLock($storageFile)) {
7474
if (filesize($storageFile) > 0) {
7575
$data = fread($this->fh, filesize($storageFile));
76-
$data = unserialize($data);
76+
unserialize($data);
7777
} else {
7878
$this->log(
7979
'debug',
8080
'Cache file was empty',
8181
array('file' => $storageFile)
8282
);
8383
}
84-
$this->unlock($storageFile);
84+
$this->unlock();
8585
}
8686

8787
$this->log(
@@ -100,8 +100,8 @@ public function set($key, $value)
100100
// We serialize the whole request object, since we don't only want the
101101
// responseContent but also the postBody used, headers, size, etc.
102102
$data = serialize($value);
103-
$result = fwrite($this->fh, $data);
104-
$this->unlock($storageFile);
103+
fwrite($this->fh, $data);
104+
$this->unlock();
105105

106106
$this->log(
107107
'debug',
@@ -212,7 +212,7 @@ private function acquireLock($type, $storageFile)
212212
return true;
213213
}
214214

215-
public function unlock($storageFile)
215+
public function unlock()
216216
{
217217
if ($this->fh) {
218218
flock($this->fh, LOCK_UN);

0 commit comments

Comments
 (0)