]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule for `abstract private` methods
authorJoshua Spence <josh@freelancer.com>
Mon, 23 Nov 2015 21:18:06 +0000 (08:18 +1100)
committerJoshua Spence <josh@freelancer.com>
Mon, 23 Nov 2015 21:18:07 +0000 (08:18 +1100)
commit20e99acf0ad1a2e7e37ba7aa8ae997308f7af296
tree533997af935f52e7446131f91c2fcc5fbf3c68a5
parent6f908f633b7ff453a667e013f03125b6c3d1844e
Add a linter rule for `abstract private` methods

Summary:
Methods cannot be marked as both `abstract` and `private`. This language construct will cause a fatal error:

```
PHP Fatal error:  Abstract function X::Y() cannot be declared private in /home/josh/workspace/github.com/phacility/arcanist/test.php on line 4
```

Test Plan: Added unit tests.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14558
src/__phutil_library_map__.php
src/lint/linter/xhpast/rules/ArcanistAbstractPrivateMethodXHPASTLinterRule.php [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/ArcanistAbstractPrivateMethodXHPASTLinterRuleTestCase.php [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/abstract-private-method/abstract-private-method.lint-test [new file with mode: 0644]