Completed
Push — master ( 73e1e5...4f3b07 )
by Tom
02:36
created
src/Builder.php 1 patch
Doc Comments   +20 added lines patch added patch discarded remove patch
@@ -19,6 +19,9 @@  discard block
 block discarded – undo
19 19
 		'\\Transphporm\\Module\\Format'
20 20
 	];
21 21
 
22
+	/**
23
+	 * @param string $template
24
+	 */
22 25
 	public function __construct($template, $tss = '', $modules = null) {
23 26
 		$this->template = $template;
24 27
 		$this->tss = $tss;
@@ -60,6 +63,11 @@  discard block
 block discarded – undo
60 63
 		return (object) $result;
61 64
 	}
62 65
 
66
+	/**
67
+	 * @param Template $template
68
+	 * @param Hook\DataFunction $data
69
+	 * @param FeatureSet $featureSet
70
+	 */
63 71
 	private function processRules($template, $data, $featureSet) {
64 72
 		$valueParser = new Parser\Value($data);
65 73
 		foreach ($this->getRules($template, $valueParser) as $rule) {
@@ -68,12 +76,20 @@  discard block
 block discarded – undo
68 76
 	}
69 77
 
70 78
 	//Add a postprocessing hook. This cleans up anything transphporm has added to the markup which needs to be removed
79
+
80
+	/**
81
+	 * @param Template $template
82
+	 */
71 83
 	private function doPostProcessing($template) {
72 84
 		$template->addHook('//*[@transphporm]', new Hook\PostProcess());
73 85
 		return $template;
74 86
 	}
75 87
 
76 88
 	//Process a TSS rule e.g. `ul li {content: "foo"; format: bar}
89
+
90
+	/**
91
+	 * @param Parser\Value $valueParser
92
+	 */
77 93
 	private function executeTssRule($rule, $template, $valueParser, $featureSet) {
78 94
 		$rule->touch();
79 95
 		$pseudoMatcher = new Hook\PseudoMatcher($rule->pseudo);
@@ -96,6 +112,10 @@  discard block
 block discarded – undo
96 112
 
97 113
 	//Load the TSS rules either from a file or as a string
98 114
 	//N.b. only files can be cached
115
+
116
+	/**
117
+	 * @param Parser\Value $valueParser
118
+	 */
99 119
 	private function getRules($template, $valueParser) {		
100 120
 		if (is_file($this->tss)) {
101 121
 			$this->baseDir = dirname(realpath($this->tss)) . DIRECTORY_SEPARATOR;
Please login to merge, or discard this patch.
src/FeatureSet.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -14,6 +14,9 @@  discard block
 block discarded – undo
14 14
 		return $this->data;
15 15
 	}
16 16
 
17
+	/**
18
+	 * @return Hook\Formatter
19
+	 */
17 20
 	public function getFormatter() {
18 21
 		return $this->formatter;
19 22
 	}
@@ -26,6 +29,9 @@  discard block
 block discarded – undo
26 29
 		$this->formatter->register($formatter);
27 30
 	}
28 31
 
32
+	/**
33
+	 * @param string $name
34
+	 */
29 35
 	public function registerProperty($name, Property $property) {
30 36
 		$this->properties[$name] = $property;
31 37
 	}
Please login to merge, or discard this patch.