Completed
Push — master ( 479b8e...e72ae9 )
by Richard
02:38
created
src/Formatter/HTMLFormatter.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -7,6 +7,9 @@
 block discarded – undo
7 7
         $this->templateFunction = $templateFunction;
8 8
     }
9 9
 
10
+    /**
11
+     * @param string $val
12
+     */
10 13
     public function html($val) {
11 14
 		return $this->templateFunction->run([$val]);
12 15
 	}
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace Transphporm\Formatter;
3 3
 class HTMLFormatter {
4
-    private $templateFunction;
4
+	private $templateFunction;
5 5
 
6
-    public function __construct(\Transphporm\TSSFunction\Template $templateFunction) {
7
-        $this->templateFunction = $templateFunction;
8
-    }
6
+	public function __construct(\Transphporm\TSSFunction\Template $templateFunction) {
7
+		$this->templateFunction = $templateFunction;
8
+	}
9 9
 
10
-    public function html($val) {
10
+	public function html($val) {
11 11
 		return $this->templateFunction->run([$val]);
12 12
 	}
13 13
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
14 14
 	public function debug($val) {
15 15
 		ob_start();
16 16
 		var_dump($val);
17
-		return $this->html('<pre>' . ob_get_clean() . '</pre>');
17
+		return $this->html('<pre>'.ob_get_clean().'</pre>');
18 18
 	}
19 19
 }
Please login to merge, or discard this patch.
src/TSSFunction/Template.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Braces   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,13 +25,18 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.