Completed
Push — 2.2 ( 1364eb...b1ebea )
by Pierre
11s
created
src/FileCache.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
 		$filename = $this->getFileName($key);
67 67
 
68 68
 		if (is_readable($filename)) {
69
-            $fp = fopen($filename, "r");
70
-            if ($fp === false) {//File may have been deleted between is_readable and fopen
71
-                return null;
72
-            }
69
+			$fp = fopen($filename, "r");
70
+			if ($fp === false) {//File may have been deleted between is_readable and fopen
71
+				return null;
72
+			}
73 73
 			flock($fp, LOCK_SH);
74
-            $timeout = fgets($fp);
74
+			$timeout = fgets($fp);
75 75
 			
76 76
 			if ($timeout > time() || $timeout==0) {
77 77
 				$contents = "";
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 			}
134 134
 		}
135 135
 
136
-        $oldUmask = umask(0);
136
+		$oldUmask = umask(0);
137 137
 		
138 138
 		if (!is_writable($filename)) {
139 139
 			if (!file_exists($this->getDirectory())) {
@@ -158,10 +158,10 @@  discard block
 block discarded – undo
158 158
 		fflush($fp);
159 159
 		flock($fp, LOCK_UN);
160 160
 		fclose($fp);
161
-        // Cache is shared with group, not with the rest of the world.
162
-        chmod($filename, 0660);
161
+		// Cache is shared with group, not with the rest of the world.
162
+		chmod($filename, 0660);
163 163
 
164
-        umask($oldUmask);
164
+		umask($oldUmask);
165 165
 	}
166 166
 	
167 167
 	/**
@@ -196,14 +196,14 @@  discard block
 block discarded – undo
196 196
 			}
197 197
 		}
198 198
 		$files = glob($this->getDirectory()."*");
199
-        if (false !== $files){// some file systems wont distinguish between empty match and an error
200
-            $prefixFile = str_replace(array("_", "/", "\\", ":"), array("___", "_s_", "_b_", "_d_"), $this->prefix);
201
-            foreach ($files as $filename) {
202
-                if (empty($prefixFile) || strpos(basename($filename), $prefixFile) === 0) {
203
-                    unlink($filename);
204
-                }
205
-            }
206
-        }
199
+		if (false !== $files){// some file systems wont distinguish between empty match and an error
200
+			$prefixFile = str_replace(array("_", "/", "\\", ":"), array("___", "_s_", "_b_", "_d_"), $this->prefix);
201
+			foreach ($files as $filename) {
202
+				if (empty($prefixFile) || strpos(basename($filename), $prefixFile) === 0) {
203
+					unlink($filename);
204
+				}
205
+			}
206
+		}
207 207
 	}
208 208
 	
209 209
 	protected function getDirectory() {
Please login to merge, or discard this patch.