]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule for `interface` method bodies
authorJoshua Spence <josh@freelancer.com>
Wed, 25 Nov 2015 20:12:00 +0000 (07:12 +1100)
committerJoshua Spence <josh@freelancer.com>
Wed, 25 Nov 2015 20:12:00 +0000 (07:12 +1100)
commit8183a458048cc01e66d3a76f2e7da66f9e0e70fa
tree5258b1051cbd05383b9ddf141929f4895af126ea
parent28f5b0ddc6bb3dd94837af87818a81e6d3fb037d
Add a linter rule for `interface` method bodies

Summary:
`interface` methods cannot contain a body. This construct will cause a fatal error:

```
PHP Fatal error:  Interface function X::Y() cannot contain body in /home/josh/workspace/github.com/phacility/arcanist/test.php on line 4
```

Test Plan: Added unit tests.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14561
src/__phutil_library_map__.php
src/lint/linter/xhpast/rules/ArcanistInterfaceMethodBodyXHPASTLinterRule.php [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/ArcanistInterfaceMethodBodyXHPASTLinterRuleTestCase.php [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/interface-method-body/body.lint-test [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/interface-method-body/no-body.lint-test [new file with mode: 0644]