Skip to content

Commit 11c533b

Browse files
committed
formatting
1 parent 7f8928b commit 11c533b

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/Illuminate/Cache/FileStore.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function put($key, $value, $seconds)
7575
);
7676

7777
if ($result !== false && $result > 0) {
78-
$this->ensureCorrectPermissions($path);
78+
$this->ensureFileHasCorrectPermissions($path);
7979

8080
return true;
8181
}
@@ -97,18 +97,15 @@ protected function ensureCacheDirectoryExists($path)
9797
}
9898

9999
/**
100-
* Set file permission if required.
100+
* Ensure the cache file has the correct permissions.
101101
*
102102
* @param string $path
103103
* @return void
104104
*/
105-
protected function ensureCorrectPermissions($path)
105+
protected function ensureFileHasCorrectPermissions($path)
106106
{
107-
if (is_null($this->filePermission)) {
108-
return;
109-
}
110-
111-
if (intval($this->files->chmod($path), 8) == $this->filePermission) {
107+
if (is_null($this->filePermission) ||
108+
intval($this->files->chmod($path), 8) == $this->filePermission) {
112109
return;
113110
}
114111

0 commit comments

Comments
 (0)