Page MenuHomePhabricator

Improve useless overriding method linter rule
ClosedPublic

Authored by joshuaspence on Aug 10 2015, 4:10 AM.
Tags
None
Referenced Files
F13993711: D13840.diff
Wed, Oct 23, 12:53 AM
F13978055: D13840.diff
Fri, Oct 18, 9:19 PM
F13978042: D13840.id.diff
Fri, Oct 18, 9:15 PM
F13978035: D13840.id33420.diff
Fri, Oct 18, 9:15 PM
F13978003: D13840.id33441.diff
Fri, Oct 18, 9:05 PM
F13958867: D13840.id.diff
Mon, Oct 14, 4:46 PM
Unknown Object (File)
Oct 3 2024, 2:17 AM
Unknown Object (File)
Oct 1 2024, 2:12 PM
Subscribers

Details

Summary

Improve ArcanistUselessOverridingMethodXHPASTLinterRule by allowing overriding methods which set default values. For example, the following scenario is perfectly valid:

class SomeClass {
  public function __construct($x) {}
}

class SomeOtherClass extends Class {
  public function __construct($x = null) {
    parent::__construct($x);
  }
}
Test Plan

Added test case.

Diff Detail

Repository
rARC Arcanist
Branch
master
Lint
Lint Passed
Unit
Test Failures
Build Status
Buildable 7555
Build 8150: [Placeholder Plan] Wait for 30 Seconds
Build 8149: arc lint + arc unit

Event Timeline

joshuaspence retitled this revision from to Improve useless overriding method linter rule.
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.Aug 10 2015, 9:37 AM
This revision was automatically updated to reflect the committed changes.