Completed
Push — master ( 0ec6f2...04a4d1 )
by Tom
02:21
created
src/TSSCache.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -6,13 +6,13 @@  discard block
 block discarded – undo
6 6
  * @version         1.2                                                             */
7 7
 namespace Transphporm;
8 8
 class TSSCache {
9
-    private $cache;
10
-    private $prefix;
9
+	private $cache;
10
+	private $prefix;
11 11
 
12
-    public function __construct(Cache $cache, $prefix) {
13
-        $this->cache = $cache;
14
-        $this->prefix = $prefix;
15
-    }
12
+	public function __construct(Cache $cache, $prefix) {
13
+		$this->cache = $cache;
14
+		$this->prefix = $prefix;
15
+	}
16 16
 
17 17
 	private function getRulesFromCache($file) {
18 18
 		//The cache for the key: the filename and template prefix
@@ -33,17 +33,17 @@  discard block
 block discarded – undo
33 33
 		return $file . $this->prefix . dirname(realpath($file)) . DIRECTORY_SEPARATOR;
34 34
 	}
35 35
 
36
-    public function load($tss) {
37
-        return $this->getRulesFromCache($tss);
38
-    }
36
+	public function load($tss) {
37
+		return $this->getRulesFromCache($tss);
38
+	}
39 39
 
40
-    public function write($file, $rules, $imports = []) {
41
-        if (is_file($file)) {
42
-        	$key = $this->getCacheKey($file);
43
-        	$existing = $this->cache->load($key, filemtime($file));
44
-        	if (isset($existing['import']) && empty($imports)) $imports = $existing['import'];
45
-        	$this->cache->write($key, ['rules' => $rules, 'import' => $imports]);
46
-        }
47
-        return $rules;
48
-    }
40
+	public function write($file, $rules, $imports = []) {
41
+		if (is_file($file)) {
42
+			$key = $this->getCacheKey($file);
43
+			$existing = $this->cache->load($key, filemtime($file));
44
+			if (isset($existing['import']) && empty($imports)) $imports = $existing['import'];
45
+			$this->cache->write($key, ['rules' => $rules, 'import' => $imports]);
46
+		}
47
+		return $rules;
48
+	}
49 49
 }
Please login to merge, or discard this patch.