Completed
Push — master ( f4d4c4...598d1e )
by Tom
02:08
created
src/SheetLoader/TSSFile.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
 		$this->fileName = $fileName;
17 17
 		$this->filePath = $filePath;
18 18
 		$this->cache = $cache;
19
-	    $this->time = $time ?? time();
20
-	    $this->cacheName = $this->fileName;
19
+		$this->time = $time ?? time();
20
+		$this->cacheName = $this->fileName;
21 21
 	}
22 22
 
23 23
 	private function getRulesFromCache($file) {
@@ -74,16 +74,16 @@  discard block
 block discarded – undo
74 74
 	}
75 75
 
76 76
 	//write the sheet to cache
77
-    public function write($rules, $imports = []) {
77
+	public function write($rules, $imports = []) {
78 78
 
79 79
 		$existing = $this->cache->load($this->fileName, filemtime($this->fileName));
80 80
 		if (isset($existing['import']) && empty($imports)) $imports = $existing['import'];
81 81
 		$this->cache->write($this->cacheName, ['rules' => $rules, 'import' => $imports, 'minFreq' => $this->getMinUpdateFreq($rules), 'ctime' => $this->time, 'cacheKey' => $this->cacheKey]);
82 82
 
83 83
 		return $rules;
84
-    }
84
+	}
85 85
 
86
-    //Gets the minimum update-frequency for a sheet's rules
86
+	//Gets the minimum update-frequency for a sheet's rules
87 87
 	private function getMinUpdateFreq($rules) {
88 88
 		$min = \PHP_INT_MAX;
89 89
 
Please login to merge, or discard this patch.
src/SheetLoader/SheetLoader.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@
 block discarded – undo
7 7
 namespace Transphporm\SheetLoader;
8 8
 //Separates out TSS file loading/caching from parsing
9 9
 class SheetLoader {
10
-    private $tss;
11
-    private $filePath;
12
-    private $time;
13
-    private $import = [];
14
-
15
-    public function __construct(\Transphporm\Cache $cache, \Transphporm\FilePath $filePath, TSSRules $tss, $time) {
16
-    	$this->cache = $cache;
17
-        $this->filePath = $filePath;
18
-        $this->tss = $tss;
19
-        $this->time = $time ?? time();
20
-    }
10
+	private $tss;
11
+	private $filePath;
12
+	private $time;
13
+	private $import = [];
14
+
15
+	public function __construct(\Transphporm\Cache $cache, \Transphporm\FilePath $filePath, TSSRules $tss, $time) {
16
+		$this->cache = $cache;
17
+		$this->filePath = $filePath;
18
+		$this->tss = $tss;
19
+		$this->time = $time ?? time();
20
+	}
21 21
 
22 22
 	//Allows controlling whether any updates are required to the template
23 23
 	//e.g. return false
Please login to merge, or discard this patch.
src/Parser/Sheet.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -100,14 +100,14 @@
 block discarded – undo
100 100
 
101 101
 
102 102
 	private function getProperties($tokens) {
103
-        $rules = $tokens->splitOnToken(Tokenizer::SEMI_COLON);
103
+		$rules = $tokens->splitOnToken(Tokenizer::SEMI_COLON);
104 104
 
105
-        $return = [];
106
-        foreach ($rules as $rule) {
107
-            $name = $rule->from(Tokenizer::NAME, true)->to(Tokenizer::COLON)->read();
108
-            $return[$name] = $rule->from(Tokenizer::COLON)->trim();
109
-        }
105
+		$return = [];
106
+		foreach ($rules as $rule) {
107
+			$name = $rule->from(Tokenizer::NAME, true)->to(Tokenizer::COLON)->read();
108
+			$return[$name] = $rule->from(Tokenizer::COLON)->trim();
109
+		}
110 110
 
111
-        return $return;
112
-    }
111
+		return $return;
112
+	}
113 113
 }
Please login to merge, or discard this patch.