Completed
Push — master ( 609c6a...23e35e )
by Tom
02:19
created
src/Builder.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,9 @@  discard block
 block discarded – undo
27 27
 		$this->cache = new Cache(new \ArrayObject());
28 28
 		$this->filePath = new FilePath();
29 29
 		$modules = is_array($modules) ? $modules : $this->defaultModules;
30
-		foreach ($modules as $module) $this->loadModule(new $module);
30
+		foreach ($modules as $module) {
31
+			$this->loadModule(new $module);
32
+		}
31 33
 	}
32 34
 
33 35
 	//Allow setting the time used by Transphporm for caching. This is for testing purposes
@@ -80,7 +82,9 @@  discard block
 block discarded – undo
80 82
 		$valueParser = new Parser\Value($functionSet);
81 83
 		$this->config = new Config($functionSet, $valueParser, $elementData, new Hook\Formatter(), new Parser\CssToXpath($functionSet, $template->getPrefix(), md5($this->tss)), $this->filePath, $headers);
82 84
 
83
-		foreach ($this->modules as $module) $module->load($this->config);
85
+		foreach ($this->modules as $module) {
86
+			$module->load($this->config);
87
+		}
84 88
 		return $template;
85 89
 	}
86 90
 
@@ -94,7 +98,9 @@  discard block
 block discarded – undo
94 98
 	//Load a template, firstly check if it's a file or a valid string
95 99
 	private function loadTemplate() {
96 100
         $result = ['cache' => $this->template, 'headers' => []];
97
-		if (strpos($this->template, "\n") === false && is_file($this->template)) $result = $this->loadTemplateFromFile($this->template);
101
+		if (strpos($this->template, "\n") === false && is_file($this->template)) {
102
+			$result = $this->loadTemplateFromFile($this->template);
103
+		}
98 104
 		return $result;
99 105
 	}
100 106
 
@@ -113,6 +119,8 @@  discard block
 block discarded – undo
113 119
 
114 120
 	public function __destruct() {
115 121
 		//Required hack as DomXPath can only register static functions clear the statically stored instance to avoid memory leaks
116
-		if (isset($this->config)) $this->config->getCssToXpath()->cleanup();
122
+		if (isset($this->config)) {
123
+			$this->config->getCssToXpath()->cleanup();
124
+		}
117 125
 	}
118 126
 }
Please login to merge, or discard this patch.