Rev 46 | Rev 49 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 46 | Rev 48 | ||
---|---|---|---|
Line 200... | Line 200... | ||
200 | if ($token == T_CONST) { |
200 | if ($token == T_CONST) { |
201 | $wait_const = true; |
201 | $wait_const = true; |
202 | } |
202 | } |
203 | 203 | ||
204 | if (($token == T_COMMENT) && self::isToDoDescription($value)) { |
204 | if (($token == T_COMMENT) && self::isToDoDescription($value)) { |
205 | // Because a TO-DO-entry can stand everywhere (e.g. between a "private" and a "function") |
205 | // Because a TO-DO-entry can stand everywhere (e.g. between a "private" and a "function" keyword) |
206 | // we shall not alter the $icon instance |
206 | // we shall not alter the $icon instance |
207 | $todoIcon = clone $icon; |
207 | $todoIcon = clone $icon; |
208 | $todoIcon->setType(ICON_TYPE_TODO); |
208 | $todoIcon->setType(ICON_TYPE_TODO); |
209 | unset($todoIcon); |
- | |
210 | FastPHPWriter::outputLeafNode($todoIcon, $line, self::stripComment($value)); |
209 | FastPHPWriter::outputLeafNode($todoIcon, $line, self::stripComment($value)); |
- | 210 | unset($todoIcon); |
|
211 | } |
211 | } |
212 | } |
212 | } |
213 | } |
213 | } |
214 | 214 | ||
215 | private static function isToDoDescription($comment) { |
215 | private static function isToDoDescription($comment) { |
216 | return ((stripos($value, 'TODO') !== false) || |
216 | return ((stripos($comment, 'TODO') !== false) || |
217 | (stripos($value, 'BUGBUG') !== false) || |
217 | (stripos($comment, 'BUGBUG') !== false) || |
218 | (stripos($value, 'FIXME') !== false) || |
218 | (stripos($comment, 'FIXME') !== false) || |
219 | (stripos($value, 'XXX') !== false)); |
219 | (stripos($comment, 'XXX') !== false)); |
220 | } |
220 | } |
221 | 221 | ||
222 | private static function stripComment($x) { |
222 | private static function stripComment($x) { |
223 | if (substr($x, 0, 1) == '#') return trim(substr($x, 1)); |
223 | if (substr($x, 0, 1) == '#') return trim(substr($x, 1)); |
224 | if (substr($x, 0, 2) == '//') return trim(substr($x, 2)); |
224 | if (substr($x, 0, 2) == '//') return trim(substr($x, 2)); |