A file can't be scanned. Rector crashes. The error "Call to a member function mapToPhpParserNode() on null" is thrown and the file is not processed
Subject
Details
Rector version
v1.0.4
When running with --debug the error is:
[ERROR] Could not process "/Users/xxx/projects/am-backend/app/JsonApi/Client.php" file, due to:
"System error: "Call to a member function mapToPhpParserNode() on null"
Bug Report
A file can't be scanned. Rector crashes. The error "Call to a member function mapToPhpParserNode() on null" is thrown and the file is not processed
When running with --debug the error is:
[ERROR] Could not process "/Users/xxx/projects/am-backend/app/JsonApi/Client.php" file, due to:
"System error: "Call to a member function mapToPhpParserNode() on null"
Minimal PHP Code Causing Issue
https://getrector.com/demo/d5fc25af-b1bb-4779-8779-d0abae91c284
Expected Behaviour
Rector should not crash.