Page MenuHomePhabricator

Add a linter rule for `interface` method bodies
ClosedPublic

Authored by joshuaspence on Nov 23 2015, 9:13 PM.
Tags
None
Referenced Files
F15410012: D14561.diff
Wed, Mar 19, 6:34 AM
F15403176: D14561.id35259.diff
Tue, Mar 18, 2:07 AM
F15377347: D14561.id35259.diff
Thu, Mar 13, 8:40 AM
F15369446: D14561.id35259.diff
Wed, Mar 12, 6:45 AM
F15333553: D14561.id35259.diff
Sat, Mar 8, 3:00 AM
Unknown Object (File)
Jan 29 2025, 10:36 PM
Unknown Object (File)
Jan 29 2025, 10:36 PM
Unknown Object (File)
Jan 29 2025, 10:36 PM
Subscribers

Details

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.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to Add a linter rule for `interface` method bodies.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Nov 25 2015, 3:07 PM
This revision was automatically updated to reflect the committed changes.