Completed
Push — master ( 73e1e5...4f3b07 )
by Tom
02:36
created
src/Builder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 		
50 50
 		$cachedOutput = $this->loadTemplate();
51 51
 		//To be a valid XML document it must have a root element, automatically wrap it in <template> to ensure it does
52
-		$template = new Template($this->isValidDoc($cachedOutput['body']) ? str_ireplace('<!doctype', '<!DOCTYPE', $cachedOutput['body']) : '<template>' . $cachedOutput['body'] . '</template>' );
52
+		$template = new Template($this->isValidDoc($cachedOutput['body']) ? str_ireplace('<!doctype', '<!DOCTYPE', $cachedOutput['body']) : '<template>'.$cachedOutput['body'].'</template>');
53 53
 
54 54
 		$this->processRules($template, $data, $featureSet);
55 55
 		
@@ -98,11 +98,11 @@  discard block
 block discarded – undo
98 98
 	//N.b. only files can be cached
99 99
 	private function getRules($template, $valueParser) {		
100 100
 		if (is_file($this->tss)) {
101
-			$this->baseDir = dirname(realpath($this->tss)) . DIRECTORY_SEPARATOR;
101
+			$this->baseDir = dirname(realpath($this->tss)).DIRECTORY_SEPARATOR;
102 102
 			//The cache for the key: the filename and template prefix
103 103
 			//Each template may have a different prefix which changes the parsed TSS,
104 104
 			//Because of this the cache needs to be generated for each template prefix.
105
-			$key = $this->tss . $template->getPrefix() . $this->baseDir;
105
+			$key = $this->tss.$template->getPrefix().$this->baseDir;
106 106
 			//Try to load the cached rules, if not set in the cache (or expired) parse the supplied sheet
107 107
 			$rules = $this->cache->load($key, filemtime($this->tss));
108 108
 			if (!$rules) return $this->cache->write($key, (new Parser\Sheet(file_get_contents($this->tss), $this->baseDir, $valueParser, $template->getPrefix()))->parse());
Please login to merge, or discard this patch.
src/Module/Format.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
 
15 15
 	private function getLocale() {
16 16
 		if (is_array($this->locale)) return $this->locale;
17
-		else if (strlen($this->locale) > 0) return json_decode(file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . '../' . $this->locale . '.json'), true);
18
-		else return json_decode(file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . '../Formatter' . DIRECTORY_SEPARATOR . 'Locale' . DIRECTORY_SEPARATOR . 'enGB.json'), true);
17
+		else if (strlen($this->locale) > 0) return json_decode(file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'../'.$this->locale.'.json'), true);
18
+		else return json_decode(file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'../Formatter'.DIRECTORY_SEPARATOR.'Locale'.DIRECTORY_SEPARATOR.'enGB.json'), true);
19 19
 	}
20 20
 
21 21
 	public function load(\Transphporm\FeatureSet $featureSet) {
Please login to merge, or discard this patch.