Completed
Push — master ( 926afa...e2c192 )
by Tom
03:08
created
src/Builder.php 1 patch
Doc Comments   +21 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@  discard block
 block discarded – undo
20 20
 		'\\Transphporm\\Module\\Functions'
21 21
 	];
22 22
 
23
+	/**
24
+	 * @param string $template
25
+	 */
23 26
 	public function __construct($template, $tss = '', $modules = null) {
24 27
 		$this->template = $template;
25 28
 		$this->tss = $tss;
@@ -62,6 +65,12 @@  discard block
 block discarded – undo
62 65
 		return (object) $result;
63 66
 	}
64 67
 
68
+	/**
69
+	 * @param Template $template
70
+	 * @param FunctionSet $data
71
+	 * @param Config $config
72
+	 * @param FunctionSet $functionSet
73
+	 */
65 74
 	private function processRules($template, $data, $config, $functionSet) {
66 75
 		$valueParser = new Parser\Value($data);
67 76
 		$rules = $this->getRules($template, $valueParser);
@@ -72,12 +81,20 @@  discard block
 block discarded – undo
72 81
 	}
73 82
 
74 83
 	//Add a postprocessing hook. This cleans up anything transphporm has added to the markup which needs to be removed
84
+
85
+	/**
86
+	 * @param Template $template
87
+	 */
75 88
 	private function doPostProcessing($template) {
76 89
 		$template->addHook('//*[@transphporm]', new Hook\PostProcess());
77 90
 		return $template;
78 91
 	}
79 92
 
80 93
 	//Process a TSS rule e.g. `ul li {content: "foo"; format: bar}
94
+
95
+	/**
96
+	 * @param Parser\Value $valueParser
97
+	 */
81 98
 	private function executeTssRule($rule, $template, $valueParser, $config, $functionSet) {
82 99
 		$rule->touch();
83 100
 		$pseudoMatcher = $config->createPseudoMatcher($rule->pseudo);
@@ -98,6 +115,10 @@  discard block
 block discarded – undo
98 115
 
99 116
 	//Load the TSS rules either from a file or as a string
100 117
 	//N.b. only files can be cached
118
+
119
+	/**
120
+	 * @param Parser\Value $valueParser
121
+	 */
101 122
 	private function getRules($template, $valueParser) {		
102 123
 		if (is_file($this->tss)) {
103 124
 			$this->baseDir = dirname(realpath($this->tss)) . DIRECTORY_SEPARATOR;
Please login to merge, or discard this patch.
src/Hook/PropertyHook.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -31,6 +31,9 @@  discard block
 block discarded – undo
31 31
 		}
32 32
 	}
33 33
 
34
+	/**
35
+	 * @param \DOMElement $element
36
+	 */
34 37
 	private function getArgs($value, $element) {
35 38
 		return $this->valueParser->parse($value, $element);
36 39
 	}
@@ -39,6 +42,9 @@  discard block
 block discarded – undo
39 42
 		$this->properties[$name] = $property;
40 43
 	}
41 44
 
45
+	/**
46
+	 * @param \DOMElement $element
47
+	 */
42 48
 	private function callProperty($name, $element, $value) {
43 49
 		if (isset($this->properties[$name])) return $this->properties[$name]->run($value, $element, $this->rules, $this->pseudoMatcher, $this->properties);
44 50
 		return false;
Please login to merge, or discard this patch.