Summary: Improve the `ArcanistXHPASTLinter::LINT_ALIAS_FUNCTION` linter rule. Currently this rule does not correctly handle alias functions which are not strictly lowercase.
Test Plan: Added a test case.
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D12921
$function_name,
self::LINT_ALIAS_FUNCTION,
pht('Alias functions should be avoided.'),
- $aliases[$function_name->getConcreteString()]);
+ $aliases[phutil_utf8_strtolower($function_name->getConcreteString())]);
}
}
$x = array();
sizeof($x);
die();
+sizeOf($x);
~~~~~~~~~~
advice:4:1
advice:5:1
+advice:6:1
~~~~~~~~~~
<?php
$x = array();
count($x);
exit();
+count($x);