@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | 'headers' => array_merge($result['headers'], $headers), |
| 73 | 73 | 'body' => $this->doPostProcessing($template)->output($document) |
| 74 | 74 | ]; |
| 75 | - $this->cache->write($tssCache->getCacheKey($data) . $this->template, $result); |
|
| 75 | + $this->cache->write($tssCache->getCacheKey($data).$this->template, $result); |
|
| 76 | 76 | } |
| 77 | 77 | unset($result['cache'], $result['renderTime']); |
| 78 | 78 | return (object) $result; |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $elementData = new \Transphporm\Hook\ElementData(new \SplObjectStorage(), $data); |
| 83 | 83 | $functionSet = new FunctionSet($elementData); |
| 84 | 84 | //To be a valid XML document it must have a root element, automatically wrap it in <template> to ensure it does |
| 85 | - $template = new Template($this->isValidDoc($body) ? str_ireplace('<!doctype', '<!DOCTYPE', $body) : '<template>' . $body . '</template>' ); |
|
| 85 | + $template = new Template($this->isValidDoc($body) ? str_ireplace('<!doctype', '<!DOCTYPE', $body) : '<template>'.$body.'</template>'); |
|
| 86 | 86 | |
| 87 | 87 | $valueParser = new Parser\Value($functionSet); |
| 88 | 88 | $this->config = new Config($functionSet, $valueParser, $elementData, new Hook\Formatter(), new Parser\CssToXpath($functionSet, $template->getPrefix(), md5($this->tss)), $this->filePath, $headers); |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | private function loadTemplateFromFile($file) { |
| 109 | - $xml = $this->cache->load($this->cacheKey . $this->template, filemtime($this->template)); |
|
| 109 | + $xml = $this->cache->load($this->cacheKey.$this->template, filemtime($this->template)); |
|
| 110 | 110 | return $xml ? $xml : ['cache' => file_get_contents($this->template) ?: "", 'headers' => []]; |
| 111 | 111 | } |
| 112 | 112 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public function updateRequired($data) { |
| 44 | - $this->cacheName = $this->getCacheKey($data) . $this->fileName; |
|
| 44 | + $this->cacheName = $this->getCacheKey($data).$this->fileName; |
|
| 45 | 45 | |
| 46 | 46 | $rules = $this->getRulesFromCache($this->fileName, $data); |
| 47 | 47 | //Nothing was cached or the TSS file has changed, update is required |
@@ -57,8 +57,8 @@ discard block |
||
| 57 | 57 | $this->getRulesFromCache($this->fileName); |
| 58 | 58 | if ($this->cacheKey) { |
| 59 | 59 | $parser = new \Transphporm\Parser\Value($data); |
| 60 | - $x= $parser->parseTokens($this->cacheKey)[0]; |
|
| 61 | - $this->cacheName = $x . $this->tss; |
|
| 60 | + $x = $parser->parseTokens($this->cacheKey)[0]; |
|
| 61 | + $this->cacheName = $x.$this->tss; |
|
| 62 | 62 | return $x; |
| 63 | 63 | } |
| 64 | 64 | else return ''; |
@@ -84,6 +84,6 @@ |
||
| 84 | 84 | |
| 85 | 85 | |
| 86 | 86 | private function sortPseudo($a, $b) { |
| 87 | - return count($a->pseudo) > count($b->pseudo) ? 1 : -1; |
|
| 87 | + return count($a->pseudo) > count($b->pseudo) ? 1 : -1; |
|
| 88 | 88 | } |
| 89 | 89 | } |