← All changes
|
vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php
+5
-0
3.3
→
3.5.9
View file →
| @@ -205,8 +205,13 @@ | ||
| 205 | 205 | || $this->haveTokenInRange($startPos, $endPos, T_CURLY_OPEN) |
| 206 | 206 | || $this->haveTokenInRange($startPos, $endPos, '}'); |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | + public function haveTagInRange(int $startPos, int $endPos): bool { | |
| 210 | + return $this->haveTokenInRange($startPos, $endPos, \T_OPEN_TAG) | |
| 211 | + || $this->haveTokenInRange($startPos, $endPos, \T_CLOSE_TAG); | |
| 212 | + } | |
| 213 | + | |
| 209 | 214 | /** |
| 210 | 215 | * Get indentation before token position. |
| 211 | 216 | * |
| 212 | 217 | * @param int $pos Token position |