@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $cachedOutput = $this->loadTemplate(); |
32 | 32 | $xml = $cachedOutput['body']; |
33 | 33 | //To be a valid XML document it must have a root element, automatically wrap it in <template> to ensure it does |
34 | - $template = new Template($this->isValidDoc($xml) ? $xml : '<template>' . $xml . '</template>' ); |
|
34 | + $template = new Template($this->isValidDoc($xml) ? $xml : '<template>'.$xml.'</template>'); |
|
35 | 35 | $time = time(); |
36 | 36 | |
37 | 37 | foreach ($this->getRules($template) as $rule) { |
@@ -59,8 +59,8 @@ discard block |
||
59 | 59 | |
60 | 60 | private function getRules($template) { |
61 | 61 | if (is_file($this->tss)) { |
62 | - $this->baseDir = dirname(realpath($this->tss)) . DIRECTORY_SEPARATOR; |
|
63 | - $key = $this->tss . $template->getPrefix() . $this->baseDir; |
|
62 | + $this->baseDir = dirname(realpath($this->tss)).DIRECTORY_SEPARATOR; |
|
63 | + $key = $this->tss.$template->getPrefix().$this->baseDir; |
|
64 | 64 | $rules = $this->cache->load($key, filemtime($this->tss)); |
65 | 65 | if (!$rules) return $this->cache->write($key, (new Sheet(file_get_contents($this->tss), $this->baseDir, $template->getPrefix()))->parse()); |
66 | 66 | else return $rules; |
@@ -84,8 +84,8 @@ discard block |
||
84 | 84 | |
85 | 85 | private function getLocale() { |
86 | 86 | if (is_array($this->locale)) return $this->locale; |
87 | - else if (strlen($this->locale) > 0) return json_decode(file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'Formatter' . DIRECTORY_SEPARATOR . 'Locale' . DIRECTORY_SEPARATOR . $this->locale . '.json'), true); |
|
88 | - else return json_decode(file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'Formatter' . DIRECTORY_SEPARATOR . 'Locale' . DIRECTORY_SEPARATOR . 'enGB.json'), true); |
|
87 | + else if (strlen($this->locale) > 0) return json_decode(file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'Formatter'.DIRECTORY_SEPARATOR.'Locale'.DIRECTORY_SEPARATOR.$this->locale.'.json'), true); |
|
88 | + else return json_decode(file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'Formatter'.DIRECTORY_SEPARATOR.'Locale'.DIRECTORY_SEPARATOR.'enGB.json'), true); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | public function registerProperties($object) { |
@@ -10,8 +10,8 @@ |
||
10 | 10 | |
11 | 11 | const S = 1; |
12 | 12 | const M = 60; |
13 | - const H = self::M*60; |
|
14 | - const D = self::H*24; |
|
13 | + const H = self::M * 60; |
|
14 | + const D = self::H * 24; |
|
15 | 15 | |
16 | 16 | |
17 | 17 | public function __construct($query, $pseudo, $depth, $index, array $properties = []) { |