Page MenuHomePhabricator

Improve useless overriding method linter rule
ClosedPublic

Authored by joshuaspence on Aug 10 2015, 4:10 AM.
Tags
None
Referenced Files
F15410301: D13840.diff
Wed, Mar 19, 7:02 AM
Unknown Object (File)
Jan 30 2025, 7:39 PM
Unknown Object (File)
Jan 29 2025, 7:41 PM
Unknown Object (File)
Jan 19 2025, 3:00 AM
Unknown Object (File)
Jan 12 2025, 9:51 PM
Unknown Object (File)
Jan 11 2025, 12:08 AM
Unknown Object (File)
Jan 3 2025, 7:04 PM
Unknown Object (File)
Dec 30 2024, 6:37 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.