@@ -14,6 +14,10 @@ |
||
14 | 14 | const D = self::H*24; |
15 | 15 | |
16 | 16 | |
17 | + /** |
|
18 | + * @param string $query |
|
19 | + * @param integer $depth |
|
20 | + */ |
|
17 | 21 | public function __construct($query, $pseudo, $depth, $index, array $properties = []) { |
18 | 22 | $this->query = $query; |
19 | 23 | $this->pseudo = $pseudo; |
@@ -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; |
@@ -13,6 +13,9 @@ discard block |
||
13 | 13 | private $xPath; |
14 | 14 | private $tokenizer; |
15 | 15 | |
16 | + /** |
|
17 | + * @param string $tss |
|
18 | + */ |
|
16 | 19 | public function __construct($tss, $file, CssToXpath $xPath, Value $valueParser) { |
17 | 20 | $this->tss = $this->stripComments($tss, '//', "\n"); |
18 | 21 | $this->tss = $this->stripComments($this->tss, '/*', '*/'); |
@@ -52,6 +55,10 @@ discard block |
||
52 | 55 | if (empty($rules) && count($this->tss) > 0) throw new \Exception('No TSS rules parsed'); |
53 | 56 | } |
54 | 57 | |
58 | + /** |
|
59 | + * @param integer $index |
|
60 | + * @param integer $line |
|
61 | + */ |
|
55 | 62 | private function CssToRules($selector, $index, $properties, $line) { |
56 | 63 | $parts = $selector->trim()->splitOnToken(Tokenizer::ARG); |
57 | 64 | $rules = []; |
@@ -75,6 +82,9 @@ discard block |
||
75 | 82 | return $rules; |
76 | 83 | } |
77 | 84 | |
85 | + /** |
|
86 | + * @param integer $indexStart |
|
87 | + */ |
|
78 | 88 | private function processingInstructions($token, $indexStart) { |
79 | 89 | if ($token['type'] !== Tokenizer::AT_SIGN) return false; |
80 | 90 | $tokens = $this->tss->from(Tokenizer::AT_SIGN, false)->to(Tokenizer::SEMI_COLON, false); |
@@ -99,6 +109,10 @@ discard block |
||
99 | 109 | return ($a->depth < $b->depth) ? -1 : 1; |
100 | 110 | } |
101 | 111 | |
112 | + /** |
|
113 | + * @param string $open |
|
114 | + * @param string $close |
|
115 | + */ |
|
102 | 116 | private function stripComments($str, $open, $close) { |
103 | 117 | $pos = 0; |
104 | 118 | while (($pos = strpos($str, $open, $pos)) !== false) { |