@@ -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; |
@@ -4,6 +4,9 @@ |
||
4 | 4 | private $insertLocation; |
5 | 5 | private $content; |
6 | 6 | |
7 | + /** |
|
8 | + * @param string $insertLocation |
|
9 | + */ |
|
7 | 10 | public function __construct($insertLocation, \Transphporm\Property\Content $content) { |
8 | 11 | $this->insertLocation = $insertLocation; |
9 | 12 | $this->content = $content; |
@@ -30,6 +30,9 @@ discard block |
||
30 | 30 | return $rules; |
31 | 31 | } |
32 | 32 | |
33 | + /** |
|
34 | + * @param integer $indexStart |
|
35 | + */ |
|
33 | 36 | private function parseTokens($indexStart) { |
34 | 37 | $this->rules = []; |
35 | 38 | foreach (new TokenFilterIterator($this->tss, [Tokenizer::WHITESPACE]) as $token) { |
@@ -55,6 +58,10 @@ discard block |
||
55 | 58 | if (empty($rules) && count($this->tss) > 0) throw new \Exception('No TSS rules parsed'); |
56 | 59 | } |
57 | 60 | |
61 | + /** |
|
62 | + * @param Tokens $selector |
|
63 | + * @param integer $index |
|
64 | + */ |
|
58 | 65 | private function CssToRules($selector, $index, $properties, $line) { |
59 | 66 | $parts = $selector->trim()->splitOnToken(Tokenizer::ARG); |
60 | 67 | $rules = []; |
@@ -78,6 +85,9 @@ discard block |
||
78 | 85 | return $rules; |
79 | 86 | } |
80 | 87 | |
88 | + /** |
|
89 | + * @param integer $indexStart |
|
90 | + */ |
|
81 | 91 | private function processingInstructions($token, $indexStart) { |
82 | 92 | if ($token['type'] !== Tokenizer::AT_SIGN) return false; |
83 | 93 | $tokens = $this->tss->from(Tokenizer::AT_SIGN, false)->to(Tokenizer::SEMI_COLON, false); |
@@ -85,6 +85,10 @@ |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | //Add a postprocessing hook. This cleans up anything transphporm has added to the markup which needs to be removed |
88 | + |
|
89 | + /** |
|
90 | + * @param Template $template |
|
91 | + */ |
|
88 | 92 | private function doPostProcessing($template) { |
89 | 93 | $template->addHook('//*[@transphporm]', new Hook\PostProcess()); |
90 | 94 | return $template; |
@@ -21,6 +21,10 @@ |
||
21 | 21 | const D = 86400; |
22 | 22 | |
23 | 23 | |
24 | + /** |
|
25 | + * @param string $query |
|
26 | + * @param integer $depth |
|
27 | + */ |
|
24 | 28 | public function __construct($query, $pseudo, $depth, $index, $file, $line, array $properties = []) { |
25 | 29 | $this->query = $query; |
26 | 30 | $this->pseudo = $pseudo; |
@@ -42,6 +42,9 @@ discard block |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | |
45 | + /** |
|
46 | + * @param \Transphporm\Template $template |
|
47 | + */ |
|
45 | 48 | public function processRules($template, \Transphporm\Config $config) { |
46 | 49 | $rules = $this->getRules($config->getCssToXpath(), $config->getValueParser()); |
47 | 50 | |
@@ -57,11 +60,20 @@ discard block |
||
57 | 60 | } |
58 | 61 | |
59 | 62 | //Load the TSS |
63 | + |
|
64 | + /** |
|
65 | + * @param \Transphporm\Parser\CssToXpath $cssToXpath |
|
66 | + * @param \Transphporm\Parser\Value $valueParser |
|
67 | + */ |
|
60 | 68 | public function getRules($cssToXpath, $valueParser, $indexStart = 0) { |
61 | 69 | return $this->tss->getRules($cssToXpath, $valueParser, $this, $indexStart); |
62 | 70 | } |
63 | 71 | |
64 | 72 | //Process a TSS rule e.g. `ul li {content: "foo"; format: bar} |
73 | + |
|
74 | + /** |
|
75 | + * @param \Transphporm\Config $config |
|
76 | + */ |
|
65 | 77 | private function executeTssRule($rule, $template, $config) { |
66 | 78 | $rule->touch(); |
67 | 79 |
@@ -12,6 +12,10 @@ |
||
12 | 12 | private $cache; |
13 | 13 | private $time; |
14 | 14 | |
15 | + /** |
|
16 | + * @param string $fileName |
|
17 | + * @param \Transphporm\Cache $cache |
|
18 | + */ |
|
15 | 19 | public function __construct($fileName, \Transphporm\FilePath $filePath, $cache, $time) { |
16 | 20 | $this->fileName = $fileName; |
17 | 21 | $this->filePath = $filePath; |