diff --git a/src/applications/differential/editor/DifferentialCommentEditor.php b/src/applications/differential/editor/DifferentialCommentEditor.php index 386a0d9e22..8054b791c5 100644 --- a/src/applications/differential/editor/DifferentialCommentEditor.php +++ b/src/applications/differential/editor/DifferentialCommentEditor.php @@ -109,7 +109,7 @@ final class DifferentialCommentEditor extends PhabricatorEditor { $revision->loadRelationships(); $reviewer_phids = $revision->getReviewers(); if ($reviewer_phids) { - $reviewer_phids = array_combine($reviewer_phids, $reviewer_phids); + $reviewer_phids = array_fuse($reviewer_phids); } $metadata = array(); diff --git a/src/applications/macro/controller/PhabricatorMacroListController.php b/src/applications/macro/controller/PhabricatorMacroListController.php index db7a1fc591..6cfa39b338 100644 --- a/src/applications/macro/controller/PhabricatorMacroListController.php +++ b/src/applications/macro/controller/PhabricatorMacroListController.php @@ -65,7 +65,7 @@ final class PhabricatorMacroListController } if ($authors) { - $author_phids = array_combine($authors, $authors); + $author_phids = array_fuse($authors); } else { $author_phids = array(); } diff --git a/src/applications/metamta/storage/PhabricatorMetaMTAMail.php b/src/applications/metamta/storage/PhabricatorMetaMTAMail.php index 86f02f427e..7b98dd4299 100644 --- a/src/applications/metamta/storage/PhabricatorMetaMTAMail.php +++ b/src/applications/metamta/storage/PhabricatorMetaMTAMail.php @@ -804,7 +804,7 @@ final class PhabricatorMetaMTAMail extends PhabricatorMetaMTADAO { return array(); } - $phids = array_combine($phids, $phids); + $phids = array_fuse($phids); // Exclude PHIDs explicitly marked for exclusion. We use this to prevent diff --git a/src/applications/phortune/control/PhortuneMonthYearExpiryControl.php b/src/applications/phortune/control/PhortuneMonthYearExpiryControl.php index 34aea2791f..a4701aa11c 100644 --- a/src/applications/phortune/control/PhortuneMonthYearExpiryControl.php +++ b/src/applications/phortune/control/PhortuneMonthYearExpiryControl.php @@ -59,7 +59,7 @@ final class PhortuneMonthYearExpiryControl extends AphrontFormControl { $current_year = $this->getCurrentYear(); $years = range($current_year, $current_year + 20); - $years = array_combine($years, $years); + $years = array_fuse($years); if ($this->getMonthInputValue()) { $selected_month = $this->getMonthInputValue(); diff --git a/src/applications/settings/panel/PhabricatorSettingsPanelAccount.php b/src/applications/settings/panel/PhabricatorSettingsPanelAccount.php index 1e2d588016..72b58dae2a 100644 --- a/src/applications/settings/panel/PhabricatorSettingsPanelAccount.php +++ b/src/applications/settings/panel/PhabricatorSettingsPanelAccount.php @@ -62,7 +62,7 @@ final class PhabricatorSettingsPanelAccount } $timezone_ids = DateTimeZone::listIdentifiers(); - $timezone_id_map = array_combine($timezone_ids, $timezone_ids); + $timezone_id_map = array_fuse($timezone_ids); $form = new AphrontFormView(); $form diff --git a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php index b34d64af93..7a3d07fd77 100644 --- a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php +++ b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php @@ -522,7 +522,7 @@ abstract class PhabricatorApplicationTransactionEditor protected function getPHIDTransactionNewValue( PhabricatorApplicationTransaction $xaction) { - $old = array_combine($xaction->getOldValue(), $xaction->getOldValue()); + $old = array_fuse($xaction->getOldValue()); $new = $xaction->getNewValue(); $new_add = idx($new, '+', array()); @@ -531,7 +531,7 @@ abstract class PhabricatorApplicationTransactionEditor unset($new['-']); $new_set = idx($new, '=', null); if ($new_set !== null) { - $new_set = array_combine($new_set, $new_set); + $new_set = array_fuse($new_set); } unset($new['=']); diff --git a/src/infrastructure/celerity/CeleritySpriteGenerator.php b/src/infrastructure/celerity/CeleritySpriteGenerator.php index deaffac9c7..be81839173 100644 --- a/src/infrastructure/celerity/CeleritySpriteGenerator.php +++ b/src/infrastructure/celerity/CeleritySpriteGenerator.php @@ -183,7 +183,7 @@ final class CeleritySpriteGenerator { // Reorder the sprites so less-specific rules generate earlier in the sheet. // Otherwise we end up with blue "a.black" buttons because the blue rules // have the same specificity but appear later. - $gradients = array_combine($gradients, $gradients); + $gradients = array_fuse($gradients); $gradients = array_select_keys( $gradients, array( diff --git a/src/infrastructure/daemon/workers/PhabricatorWorker.php b/src/infrastructure/daemon/workers/PhabricatorWorker.php index 685771622c..3cf3159ca7 100644 --- a/src/infrastructure/daemon/workers/PhabricatorWorker.php +++ b/src/infrastructure/daemon/workers/PhabricatorWorker.php @@ -102,7 +102,7 @@ abstract class PhabricatorWorker { final public static function waitForTasks(array $task_ids) { $task_table = new PhabricatorWorkerActiveTask(); - $waiting = array_combine($task_ids, $task_ids); + $waiting = array_fuse($task_ids); while ($waiting) { $conn_w = $task_table->establishConnection('w'); diff --git a/src/view/form/control/AphrontFormDateControl.php b/src/view/form/control/AphrontFormDateControl.php index 4d398f2fa5..b010eed875 100644 --- a/src/view/form/control/AphrontFormDateControl.php +++ b/src/view/form/control/AphrontFormDateControl.php @@ -181,7 +181,7 @@ final class AphrontFormDateControl extends AphrontFormControl { $max_year = $this->getMaxYear(); $days = range(1, 31); - $days = array_combine($days, $days); + $days = array_fuse($days); $months = array( 1 => 'Jan', @@ -199,7 +199,7 @@ final class AphrontFormDateControl extends AphrontFormControl { ); $years = range($this->getMinYear(), $this->getMaxYear()); - $years = array_combine($years, $years); + $years = array_fuse($years); $days_sel = AphrontFormSelectControl::renderSelectTag( $this->getDayInputValue(),