HomePhabricator

Add a linter rule for self member references

Description

Add a linter rule for self member references

Summary:
Ref T7409. Adds a linter rule for the following:

  • self:: is used instead of Self::.
  • self:: is used for local static member reference.
  • self:: is used instead of self ::.

Based on Squiz_Sniffs_Classes_SelfMemberReferenceSniff.

Test Plan: Added unit tests.

Reviewers: epriestley, Blessed Reviewers

Reviewed By: epriestley, Blessed Reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T7409

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

Details

Provenance
joshuaspenceAuthored on
joshuaspencePushed on Apr 12 2015, 9:38 PM
Reviewer
Blessed Reviewers
Differential Revision
D12370: Add a linter rule for self member references
Parents
rARC6525a309c29f: Further improvements to keyword casing linter rule
Branches
Unknown
Tags
Unknown
Tasks
T7409: Implement PHPCS lints