Page MenuHomePhabricator

Improve useless overriding method linter rule
ClosedPublic

Authored by joshuaspence on Aug 10 2015, 4:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 7, 10:15 AM
Unknown Object (File)
Fri, May 3, 10:37 AM
Unknown Object (File)
Thu, Apr 25, 3:55 AM
Unknown Object (File)
Apr 6 2024, 12:42 AM
Unknown Object (File)
Mar 28 2024, 2:10 PM
Unknown Object (File)
Mar 21 2024, 2:27 AM
Unknown Object (File)
Mar 16 2024, 10:40 PM
Unknown Object (File)
Feb 16 2024, 4:09 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
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.