mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Replace leading double underscore in function names by single underscore
Summary: > PHP reserves all symbols starting with __ as magical. http://php.net/userlandnaming.rules I didn't touch third-party S3 library. Test Plan: / Reviewers: epriestley Reviewed By: epriestley CC: aran Differential Revision: https://secure.phabricator.com/D2077
This commit is contained in:
parent
7dfdf63948
commit
a309d5ba2f
4 changed files with 15 additions and 15 deletions
|
@ -929,8 +929,7 @@ phutil_register_library_map(array(
|
|||
),
|
||||
'function' =>
|
||||
array(
|
||||
'__phabricator_date_format' => 'view/utils',
|
||||
'__phabricator_format_local_time' => 'view/utils',
|
||||
'_phabricator_date_format' => 'view/utils',
|
||||
'_qsprintf_check_scalar_type' => 'storage/qsprintf',
|
||||
'_qsprintf_check_type' => 'storage/qsprintf',
|
||||
'celerity_generate_unique_node_id' => 'infrastructure/celerity/api',
|
||||
|
@ -938,6 +937,7 @@ phutil_register_library_map(array(
|
|||
'javelin_render_tag' => 'infrastructure/javelin/markup',
|
||||
'phabricator_date' => 'view/utils',
|
||||
'phabricator_datetime' => 'view/utils',
|
||||
'phabricator_format_local_time' => 'view/utils',
|
||||
'phabricator_format_relative_time' => 'view/utils',
|
||||
'phabricator_format_units_generic' => 'view/utils',
|
||||
'phabricator_on_relative_date' => 'view/utils',
|
||||
|
|
|
@ -145,7 +145,7 @@ final class ManiphestReportController extends ManiphestController {
|
|||
continue;
|
||||
}
|
||||
|
||||
$day_bucket = __phabricator_format_local_time(
|
||||
$day_bucket = phabricator_format_local_time(
|
||||
$row['dateCreated'],
|
||||
$user,
|
||||
'z');
|
||||
|
@ -179,7 +179,7 @@ final class ManiphestReportController extends ManiphestController {
|
|||
foreach ($stats as $bucket => $info) {
|
||||
$epoch = $day_buckets[$bucket];
|
||||
|
||||
$week_bucket = __phabricator_format_local_time(
|
||||
$week_bucket = phabricator_format_local_time(
|
||||
$epoch,
|
||||
$user,
|
||||
'W');
|
||||
|
@ -195,14 +195,14 @@ final class ManiphestReportController extends ManiphestController {
|
|||
$last_week_epoch = $epoch;
|
||||
}
|
||||
|
||||
$month_bucket = __phabricator_format_local_time(
|
||||
$month_bucket = phabricator_format_local_time(
|
||||
$epoch,
|
||||
$user,
|
||||
'm');
|
||||
if ($month_bucket != $last_month) {
|
||||
if ($month) {
|
||||
$rows[] = $this->formatBurnRow(
|
||||
__phabricator_format_local_time($last_month_epoch, $user, 'F, Y'),
|
||||
phabricator_format_local_time($last_month_epoch, $user, 'F, Y'),
|
||||
$month);
|
||||
$rowc[] = 'month';
|
||||
}
|
||||
|
|
|
@ -240,7 +240,7 @@ final class PhabricatorIRCBot extends PhabricatorDaemon {
|
|||
}
|
||||
}
|
||||
|
||||
public function __destroy() {
|
||||
public function __destruct() {
|
||||
$this->write("QUIT Goodbye.\r\n");
|
||||
fclose($this->socket);
|
||||
}
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
*/
|
||||
|
||||
function phabricator_date($epoch, $user) {
|
||||
return __phabricator_format_local_time(
|
||||
return phabricator_format_local_time(
|
||||
$epoch,
|
||||
$user,
|
||||
__phabricator_date_format($epoch));
|
||||
_phabricator_date_format($epoch));
|
||||
}
|
||||
|
||||
function phabricator_on_relative_date($epoch, $user) {
|
||||
|
@ -51,20 +51,20 @@ function phabricator_relative_date($epoch, $user, $on = false) {
|
|||
}
|
||||
|
||||
function phabricator_time($epoch, $user) {
|
||||
return __phabricator_format_local_time(
|
||||
return phabricator_format_local_time(
|
||||
$epoch,
|
||||
$user,
|
||||
'g:i A');
|
||||
}
|
||||
|
||||
function phabricator_datetime($epoch, $user) {
|
||||
return __phabricator_format_local_time(
|
||||
return phabricator_format_local_time(
|
||||
$epoch,
|
||||
$user,
|
||||
__phabricator_date_format($epoch).', g:i A');
|
||||
_phabricator_date_format($epoch).', g:i A');
|
||||
}
|
||||
|
||||
function __phabricator_date_format($epoch) {
|
||||
function _phabricator_date_format($epoch) {
|
||||
$format = 'M j Y';
|
||||
$now = time();
|
||||
if ($epoch <= $now && $epoch > $now - 30 * 24 * 60 * 60) {
|
||||
|
@ -74,7 +74,7 @@ function __phabricator_date_format($epoch) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Internal date rendering method. Do not call this directly; instead, call
|
||||
* This function does not usually need to be called directly. Instead, call
|
||||
* @{function:phabricator_date}, @{function:phabricator_time}, or
|
||||
* @{function:phabricator_datetime}.
|
||||
*
|
||||
|
@ -83,7 +83,7 @@ function __phabricator_date_format($epoch) {
|
|||
* @param string Date format, as per DateTime class.
|
||||
* @return string Formatted, local date/time.
|
||||
*/
|
||||
function __phabricator_format_local_time($epoch, $user, $format) {
|
||||
function phabricator_format_local_time($epoch, $user, $format) {
|
||||
if (!$epoch) {
|
||||
// If we're missing date information for something, the DateTime class will
|
||||
// throw an exception when we try to construct an object. Since this is a
|
||||
|
|
Loading…
Reference in a new issue