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)
Sun, Dec 15, 2:57 AM
Unknown Object (File)
Wed, Nov 27, 4:55 PM
Unknown Object (File)
Sat, Nov 23, 11:34 PM
Unknown Object (File)
Nov 20 2024, 3:40 AM
Unknown Object (File)
Nov 20 2024, 3:40 AM
Unknown Object (File)
Nov 20 2024, 3:35 AM
Unknown Object (File)
Nov 20 2024, 3:29 AM
Unknown Object (File)
Oct 23 2024, 12:53 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.