Add a linter rule for incorrect use of parent scope
Summary:
The following code is invalid:
final class MyClass { public function __construct() { parent::__construct(null); } } $x = new MyClass();
Running the above code will produce a fatal error:
PHP Fatal error: Cannot access parent:: when current class scope has no parent
Test Plan: Added unit tests.
Reviewers: epriestley, Blessed Reviewers
Reviewed By: epriestley, Blessed Reviewers
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D12420