If I understand correctly, all classes should extend from Phobject?
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Commits
- rARCac8367a884ff: Add a linter rule for extending Phobject
This needs some further work
Diff Detail
Diff Detail
- Repository
- rARC Arcanist
- Branch
- master
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 6738 Build 6760: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
Comment Actions
Seems reasonable. Couple of inlines.
src/lint/linter/ArcanistPhutilXHPASTLinter.php | ||
---|---|---|
317–318 | Do we need a check for Phobject itself here? I'd guess this might raise a silly "phobject must extend phobject" warning. | |
322 | Maybe more clear as "...extend from Phobject or some other object.", to make it clear that "class B extends A {" is fine, just not "class B {". |
src/lint/linter/ArcanistPhutilXHPASTLinter.php | ||
---|---|---|
327 | Maybe "...from some other class.", vs "other object." |