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
F19819600: D14561.id35219.diff
Mar 6 2026, 7:42 AM
F19707229: D14561.id35219.diff
Feb 11 2026, 10:55 AM
F19543251: D14561.id35259.diff
Jan 22 2026, 5:26 PM
F19526783: D14561.id35219.diff
Jan 18 2026, 8:06 PM
F19505388: D14561.id35259.diff
Jan 9 2026, 11:22 AM
F19503959: D14561.id35219.diff
Jan 9 2026, 2:51 AM
F19344099: D14561.diff
Dec 26 2025, 12:26 AM
F19005122: D14561.id35219.diff
Nov 21 2025, 2:01 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.