@@ -26,9 +26,9 @@ |
||
26 | 26 | $tss = $this->readArray($args, 2); |
27 | 27 | |
28 | 28 | if (trim($args[0])[0] === '<') $xml = $args[0]; |
29 | - else $xml = $this->baseDir . $args[0]; |
|
29 | + else $xml = $this->baseDir.$args[0]; |
|
30 | 30 | |
31 | - $newTemplate = new \Transphporm\Builder($xml, $tss ? $this->baseDir . $tss : null); |
|
31 | + $newTemplate = new \Transphporm\Builder($xml, $tss ? $this->baseDir.$tss : null); |
|
32 | 32 | |
33 | 33 | $doc = $newTemplate->output($this->elementData->getData($element), true)->body; |
34 | 34 | if ($selector != '') return $this->templateSubsection($doc, $selector); |
@@ -25,13 +25,18 @@ discard block |
||
25 | 25 | $selector = $this->readArray($args, 1); |
26 | 26 | $tss = $this->readArray($args, 2); |
27 | 27 | |
28 | - if (trim($args[0])[0] === '<') $xml = $args[0]; |
|
29 | - else $xml = $this->baseDir . $args[0]; |
|
28 | + if (trim($args[0])[0] === '<') { |
|
29 | + $xml = $args[0]; |
|
30 | + } else { |
|
31 | + $xml = $this->baseDir . $args[0]; |
|
32 | + } |
|
30 | 33 | |
31 | 34 | $newTemplate = new \Transphporm\Builder($xml, $tss ? $this->baseDir . $tss : null); |
32 | 35 | |
33 | 36 | $doc = $newTemplate->output($this->elementData->getData($element), true)->body; |
34 | - if ($selector != '') return $this->templateSubsection($doc, $selector); |
|
37 | + if ($selector != '') { |
|
38 | + return $this->templateSubsection($doc, $selector); |
|
39 | + } |
|
35 | 40 | |
36 | 41 | return $this->getTemplateContent($doc, $tss); |
37 | 42 | |
@@ -62,7 +67,9 @@ discard block |
||
62 | 67 | |
63 | 68 | private function getClonedElement($node, $tss) { |
64 | 69 | $clone = $node->cloneNode(true); |
65 | - if ($tss != null && $clone instanceof \DomElement) $clone->setAttribute('transphporm', 'includedtemplate'); |
|
70 | + if ($tss != null && $clone instanceof \DomElement) { |
|
71 | + $clone->setAttribute('transphporm', 'includedtemplate'); |
|
72 | + } |
|
66 | 73 | return $clone; |
67 | 74 | } |
68 | 75 | } |