]> khamidou — GitHub mirrors - arcanist.git/commit
Improve ArcanistXHPASTLinter::LINT_TOSTRING_EXCEPTION
authorJoshua Spence <josh@joshuaspence.com>
Sun, 17 May 2015 23:04:22 +0000 (09:04 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Sun, 17 May 2015 23:14:55 +0000 (09:14 +1000)
commit8c6e1284cc656034955228412154b22b556b5430
treee15e836b1e81456993a2f13af1d8e40a0055db22
parent2422202ba4298b3b53433954ae98cc22f5eb36de
Improve ArcanistXHPASTLinter::LINT_TOSTRING_EXCEPTION

Summary:
The `ArcanistXHPASTLinter::LINT_TOSTRING_EXCEPTION` linter rule was introduced in D12854, but fails for the following:

  - Interfaces which declare the `__toString()` method.
  - Classes which mark the `__toString()` method as `abstract`.

Test Plan: Added test cases.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12892
src/lint/linter/ArcanistXHPASTLinter.php
src/lint/linter/__tests__/xhpast/tostring-exception.lint-test