HomePhabricator

Add a linter rule for declaring nested functions

Description

Add a linter rule for declaring nested functions

Summary: Ref T7409. Adds ArcanistXHPASTLinter::LINT_INNER_FUNCTION to advise against declaring PHP functions within an outer function. Based on Squiz_Sniffs_PHP_InnerFunctionsSniff.

Test Plan: Added unit tests.

Reviewers: Blessed Reviewers, epriestley

Reviewed By: Blessed Reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7409

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

Details

Provenance
joshuaspenceAuthored on
joshuaspencePushed on Apr 13 2015, 8:32 PM
Reviewer
Blessed Reviewers
Differential Revision
D12389: Add a linter rule for declaring nested functions
Parents
rARC7bba30f66cee: Various linter fixes
Branches
Unknown
Tags
Unknown
Tasks
T7409: Implement PHPCS lints