| 1: | <?php declare(strict_types = 1); |
| 2: | |
| 3: | namespace PHPStan\Parser; |
| 4: | |
| 5: | use PhpParser\Node; |
| 6: | |
| 7: | /** @api */ |
| 8: | interface Parser |
| 9: | { |
| 10: | |
| 11: | /** |
| 12: | * @param string $file path to a file to parse |
| 13: | * @return Node\Stmt[] |
| 14: | * @throws ParserErrorsException |
| 15: | */ |
| 16: | public function parseFile(string $file): array; |
| 17: | |
| 18: | /** |
| 19: | * @return Node\Stmt[] |
| 20: | * @throws ParserErrorsException |
| 21: | */ |
| 22: | public function parseString(string $sourceCode): array; |
| 23: | |
| 24: | } |
| 25: |