@@ -62,6 +62,10 @@ discard block |
||
62 | 62 | return (object) $result; |
63 | 63 | } |
64 | 64 | |
65 | + /** |
|
66 | + * @param Template $template |
|
67 | + * @param Config $config |
|
68 | + */ |
|
65 | 69 | private function processRules($template, $config) { |
66 | 70 | $rules = $this->getRules($template, $config); |
67 | 71 | |
@@ -71,6 +75,10 @@ discard block |
||
71 | 75 | } |
72 | 76 | |
73 | 77 | //Add a postprocessing hook. This cleans up anything transphporm has added to the markup which needs to be removed |
78 | + |
|
79 | + /** |
|
80 | + * @param Template $template |
|
81 | + */ |
|
74 | 82 | private function doPostProcessing($template) { |
75 | 83 | $template->addHook('//*[@transphporm]', new Hook\PostProcess()); |
76 | 84 | return $template; |
@@ -7,6 +7,9 @@ |
||
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(['<template>' . $val . '</template>']); |
12 | 15 | } |
@@ -13,6 +13,9 @@ |
||
13 | 13 | private $functionSet; |
14 | 14 | private $id; |
15 | 15 | |
16 | + /** |
|
17 | + * @param string $id |
|
18 | + */ |
|
16 | 19 | public function __construct(\Transphporm\FunctionSet $functionSet, $prefix = '', $id = null) { |
17 | 20 | $this->id = $id; |
18 | 21 | self::$instances[$this->id] = $this; |
@@ -39,6 +39,9 @@ discard block |
||
39 | 39 | return $this->cache->write($this->file, $rules, $this->import); |
40 | 40 | } |
41 | 41 | |
42 | + /** |
|
43 | + * @param integer $indexStart |
|
44 | + */ |
|
42 | 45 | private function parseTokens($indexStart) { |
43 | 46 | $this->rules = []; |
44 | 47 | foreach (new TokenFilterIterator($this->tss, [Tokenizer::WHITESPACE]) as $token) { |
@@ -65,6 +68,10 @@ discard block |
||
65 | 68 | if (empty($rules) && count($this->tss) > 0) throw new \Exception('No TSS rules parsed'); |
66 | 69 | } |
67 | 70 | |
71 | + /** |
|
72 | + * @param Tokens $selector |
|
73 | + * @param integer $index |
|
74 | + */ |
|
68 | 75 | private function CssToRules($selector, $index, $properties, $line) { |
69 | 76 | $parts = $selector->trim()->splitOnToken(Tokenizer::ARG); |
70 | 77 | $rules = []; |
@@ -88,6 +95,9 @@ discard block |
||
88 | 95 | return $rules; |
89 | 96 | } |
90 | 97 | |
98 | + /** |
|
99 | + * @param integer $indexStart |
|
100 | + */ |
|
91 | 101 | private function processingInstructions($token, $indexStart) { |
92 | 102 | if ($token['type'] !== Tokenizer::AT_SIGN) return false; |
93 | 103 | $tokens = $this->tss->from(Tokenizer::AT_SIGN, false)->to(Tokenizer::SEMI_COLON, false); |