HomePhabricator

Improve useless overriding method linter rule

Description

Improve useless overriding method linter rule

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.

Reviewers: epriestley, Blessed Reviewers

Reviewed By: epriestley, Blessed Reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13840

Details

Provenance
joshuaspenceAuthored on
joshuaspencePushed on Aug 10 2015, 8:49 PM
Reviewer
Blessed Reviewers
Differential Revision
D13840: Improve useless overriding method linter rule
Parents
rARCf43b74c6052f: Improve PHP compatibility linter
Branches
Unknown
Tags
Unknown