Assert that php and php-parser are installed
()
| 229 | class PHP(BaseLanguage): |
| 230 | @staticmethod |
| 231 | def assert_dependencies(): |
| 232 | """Assert that php and php-parser are installed""" |
| 233 | assert is_installed('php'), "No php installation could be found" |
| 234 | self_ref = os.path.join(os.path.dirname(os.path.realpath(__file__)), |
| 235 | "get_ast.php") |
| 236 | outp, returncode = run_ast_parser(self_ref) |
| 237 | path = os.path.dirname(os.path.realpath(__file__)) |
| 238 | assert_msg = 'Error running the PHP parser. From the `%s` directory, run ' \ |
| 239 | '`composer require nikic/php-parser "^4.10"`.' % path |
| 240 | assert not returncode, assert_msg |
| 241 | return outp |
| 242 | |
| 243 | @staticmethod |
| 244 | def get_tree(filename, lang_params): |
no test coverage detected