@@ -151,7 +151,7 @@ |
||
151 | 151 | } |
152 | 152 | |
153 | 153 | /** |
154 | - * @return Token|null|false |
|
154 | + * @return Token |
|
155 | 155 | */ |
156 | 156 | public function getEnd() |
157 | 157 | { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | /** |
26 | 26 | * RegexMatcher constructor. |
27 | 27 | * |
28 | - * @param $regex |
|
28 | + * @param string $regex |
|
29 | 29 | * @param callable $callable |
30 | 30 | */ |
31 | 31 | public function __construct($regex, callable $callable) |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | /** |
143 | 143 | * @param bool $embedded |
144 | 144 | * |
145 | - * @return Rule[] |
|
145 | + * @return \Generator |
|
146 | 146 | */ |
147 | 147 | private function _rules($embedded = false) |
148 | 148 | { |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | * |
169 | 169 | * @param $embedded |
170 | 170 | * |
171 | - * @return Rule|\Kadet\Highlighter\Parser\Rule[] |
|
171 | + * @return Rule |
|
172 | 172 | */ |
173 | 173 | public function getEnds($embedded = false) |
174 | 174 | { |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * @param InputInterface $input |
48 | 48 | * @param Language $language |
49 | 49 | * @param FormatterInterface $formatter |
50 | - * @param $source |
|
50 | + * @param string $source |
|
51 | 51 | */ |
52 | 52 | public function __construct( |
53 | 53 | OutputInterface $output, InputInterface $input, Language $language, FormatterInterface $formatter, $source |
@@ -97,11 +97,17 @@ discard block |
||
97 | 97 | return $formatted; |
98 | 98 | } |
99 | 99 | |
100 | + /** |
|
101 | + * @param string $feature |
|
102 | + */ |
|
100 | 103 | public function wants($feature) |
101 | 104 | { |
102 | 105 | return in_array($feature, $this->_input->getOption('debug')); |
103 | 106 | } |
104 | 107 | |
108 | + /** |
|
109 | + * @return Tokens |
|
110 | + */ |
|
105 | 111 | protected function tokenize() |
106 | 112 | { |
107 | 113 | $tokens = $this->benchmark(function () { |
@@ -125,12 +131,18 @@ discard block |
||
125 | 131 | return $return; |
126 | 132 | } |
127 | 133 | |
134 | + /** |
|
135 | + * @param string $message |
|
136 | + */ |
|
128 | 137 | private function _tree(Tokens $tree, $message, $indented = true) |
129 | 138 | { |
130 | 139 | $this->_output->writeln("Token tree <comment>$message</comment>: "); |
131 | 140 | $this->_output->writeln($this->_debug->format(clone $tree, $indented)); |
132 | 141 | } |
133 | 142 | |
143 | + /** |
|
144 | + * @return Tokens |
|
145 | + */ |
|
134 | 146 | protected function parse(Tokens $tokens) |
135 | 147 | { |
136 | 148 | $tokens = $this->benchmark(function () use ($tokens) { |
@@ -152,6 +164,9 @@ discard block |
||
152 | 164 | }, $this->_times['formatting']); |
153 | 165 | } |
154 | 166 | |
167 | + /** |
|
168 | + * @param string $message |
|
169 | + */ |
|
155 | 170 | private function _slashed($message, $data) |
156 | 171 | { |
157 | 172 | $this->_output->writeln(sprintf( |
@@ -75,7 +75,7 @@ |
||
75 | 75 | |
76 | 76 | /** |
77 | 77 | * @param OutputInterface $output |
78 | - * @param $class |
|
78 | + * @param string $class |
|
79 | 79 | * |
80 | 80 | * @return array|false |
81 | 81 | */ |