@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator

Reduce really unnecessary calls to the id() function

Summary:
Premising that the function id() is occasionally useful;

There is no need to wrap every single object creation with id(),
even where there is just one statement.

There is also a parallel patch for Arcanist: D26611.

Ref T15976

Test Plan:
Look with my little eyes that I've not introduced mistakes.

Run the linter. No syntax errors.

Run this grep, to find such simple calls:

grep -ER '= id\(new [a-zA-Z0-9]+\([^(]*?\)\);' src/

Before the change, 67 results.

After the change, 0 results.

Reviewers: O1 Blessed Committers, aklapper

Reviewed By: O1 Blessed Committers, aklapper

Subscribers: aklapper, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15976

Differential Revision: https://we.phorge.it/D26610

+68 -68
+1 -1
src/applications/audit/management/PhabricatorAuditManagementDeleteWorkflow.php
··· 111 111 $query->withPHIDs(mpull($commits, 'getPHID')); 112 112 } 113 113 114 - $commit_iterator = id(new PhabricatorQueryIterator($query)); 114 + $commit_iterator = new PhabricatorQueryIterator($query); 115 115 116 116 // See T13457. We may be examining many commits; each commit is small so 117 117 // we can safely increase the page size to improve performance a bit.
+1 -1
src/applications/auth/conduit/PhabricatorAuthLogoutConduitAPIMethod.php
··· 36 36 $viewer = $request->getUser(); 37 37 38 38 // Destroy all web sessions. 39 - $engine = id(new PhabricatorAuthSessionEngine()); 39 + $engine = new PhabricatorAuthSessionEngine(); 40 40 $engine->terminateLoginSessions($viewer); 41 41 42 42 // If we were called via OAuth, destroy the OAuth token.
+1 -1
src/applications/auth/controller/PhabricatorAuthRegisterController.php
··· 582 582 ->setError($e_captcha)); 583 583 } 584 584 585 - $submit = id(new AphrontFormSubmitControl()); 585 + $submit = new AphrontFormSubmitControl(); 586 586 587 587 if ($is_setup) { 588 588 $submit
+1 -1
src/applications/auth/query/PhabricatorAuthInviteSearchEngine.php
··· 22 22 } 23 23 24 24 public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) { 25 - $query = id(new PhabricatorAuthInviteQuery()); 25 + $query = new PhabricatorAuthInviteQuery(); 26 26 27 27 return $query; 28 28 }
+2 -2
src/applications/auth/revoker/PhabricatorAuthConduitTokenRevoker.php
··· 19 19 } 20 20 21 21 public function revokeAllCredentials() { 22 - $table = id(new PhabricatorConduitToken()); 22 + $table = new PhabricatorConduitToken(); 23 23 $conn = $table->establishConnection('w'); 24 24 25 25 queryfx( ··· 31 31 } 32 32 33 33 public function revokeCredentialsFrom($object) { 34 - $table = id(new PhabricatorConduitToken()); 34 + $table = new PhabricatorConduitToken(); 35 35 $conn = $table->establishConnection('w'); 36 36 37 37 queryfx(
+1 -1
src/applications/badges/query/PhabricatorBadgesSearchEngine.php
··· 108 108 109 109 $viewer = $this->requireViewer(); 110 110 111 - $list = id(new PHUIObjectItemListView()); 111 + $list = new PHUIObjectItemListView(); 112 112 foreach ($badges as $badge) { 113 113 $quality_name = PhabricatorBadgesQuality::getQualityName( 114 114 $badge->getQuality());
+1 -1
src/applications/calendar/parser/data/__tests__/PhutilCalendarRecurrenceTestCase.php
··· 3 3 final class PhutilCalendarRecurrenceTestCase extends PhutilTestCase { 4 4 5 5 public function testCalendarRecurrenceLists() { 6 - $set = id(new PhutilCalendarRecurrenceSet()); 6 + $set = new PhutilCalendarRecurrenceSet(); 7 7 $result = $set->getEventsBetween(null, null, 0xFFFF); 8 8 $this->assertEqual( 9 9 array(),
+2 -2
src/applications/conduit/controller/PhabricatorConduitConsoleController.php
··· 139 139 140 140 $viewer = $this->getViewer(); 141 141 142 - $description_properties = id(new PHUIPropertyListView()); 142 + $description_properties = new PHUIPropertyListView(); 143 143 144 144 $description_properties->addTextContent( 145 145 new PHUIRemarkupView($viewer, $method->getMethodDescription())); ··· 215 215 private function buildMethodProperties(ConduitAPIMethod $method) { 216 216 $viewer = $this->getViewer(); 217 217 218 - $view = id(new PHUIPropertyListView()); 218 + $view = new PHUIPropertyListView(); 219 219 220 220 $status = $method->getMethodStatus(); 221 221 $reason = $method->getMethodStatusDescription();
+2 -2
src/applications/conduit/query/PhabricatorConduitSearchEngine.php
··· 31 31 } 32 32 33 33 public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) { 34 - $query = id(new PhabricatorConduitMethodQuery()); 34 + $query = new PhabricatorConduitMethodQuery(); 35 35 36 36 $query->withIsStable($saved->getParameter('isStable')); 37 37 $query->withIsUnstable($saved->getParameter('isUnstable')); ··· 146 146 if ($list) { 147 147 $out[] = $list; 148 148 } 149 - $list = id(new PHUIObjectItemListView()); 149 + $list = new PHUIObjectItemListView(); 150 150 $list->setHeader($app); 151 151 152 152 $app_object = $method->getApplication();
+2 -2
src/applications/config/controller/services/PhabricatorConfigCacheController.php
··· 43 43 44 44 private function renderCodeBox() { 45 45 $cache = PhabricatorOpcodeCacheSpec::getActiveCacheSpec(); 46 - $properties = id(new PHUIPropertyListView()); 46 + $properties = new PHUIPropertyListView(); 47 47 $this->renderCommonProperties($properties, $cache); 48 48 return $this->buildConfigBoxView(pht('Opcode Cache'), $properties); 49 49 } ··· 51 51 private function renderDataBox() { 52 52 $cache = PhabricatorDataCacheSpec::getActiveCacheSpec(); 53 53 54 - $properties = id(new PHUIPropertyListView()); 54 + $properties = new PHUIPropertyListView(); 55 55 56 56 $this->renderCommonProperties($properties, $cache); 57 57
+1 -1
src/applications/config/controller/services/PhabricatorConfigClusterSearchController.php
··· 124 124 } 125 125 126 126 private function renderIndexStats($stats) { 127 - $view = id(new PHUIPropertyListView()); 127 + $view = new PHUIPropertyListView(); 128 128 if ($stats !== false) { 129 129 foreach ($stats as $label => $val) { 130 130 $view->addProperty($label, $val);
+1 -1
src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php
··· 513 513 } 514 514 515 515 private function freeActiveLeases() { 516 - $task_table = id(new PhabricatorWorkerActiveTask()); 516 + $task_table = new PhabricatorWorkerActiveTask(); 517 517 $conn_w = $task_table->establishConnection('w'); 518 518 queryfx( 519 519 $conn_w,
+1 -1
src/applications/dashboard/typeahead/PhabricatorDashboardDatasource.php
··· 16 16 } 17 17 18 18 public function loadResults() { 19 - $query = id(new PhabricatorDashboardQuery()); 19 + $query = new PhabricatorDashboardQuery(); 20 20 21 21 $this->applyFerretConstraints( 22 22 $query,
+1 -1
src/applications/differential/engine/DifferentialFileTreeEngine.php
··· 78 78 ->setHref('#')); 79 79 $flank_view->setHead($head_view); 80 80 81 - $tail_view = id(new PHUIListView()); 81 + $tail_view = new PHUIListView(); 82 82 83 83 if ($viewer->isLoggedIn()) { 84 84 $tail_view->addMenuItem(
+1 -1
src/applications/differential/query/DifferentialChangesetSearchEngine.php
··· 27 27 } 28 28 29 29 public function newQuery() { 30 - $query = id(new DifferentialChangesetQuery()); 30 + $query = new DifferentialChangesetQuery(); 31 31 32 32 if ($this->diff) { 33 33 $query->withDiffs(array($this->diff));
+1 -1
src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php
··· 203 203 'radios' => $radios, 204 204 )); 205 205 206 - $table = id(new AphrontTableView($rows)); 206 + $table = new AphrontTableView($rows); 207 207 $table->setHeaders( 208 208 array( 209 209 pht('Diff'),
+1 -1
src/applications/diffusion/view/DiffusionCommitGraphView.php
··· 104 104 } 105 105 106 106 public function newObjectItemListView() { 107 - $list_view = id(new PHUIObjectItemListView()); 107 + $list_view = new PHUIObjectItemListView(); 108 108 109 109 $item_views = $this->newObjectItemViews(); 110 110 foreach ($item_views as $item_view) {
+1 -1
src/applications/diviner/query/DivinerAtomSearchEngine.php
··· 32 32 } 33 33 34 34 public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) { 35 - $query = id(new DivinerAtomQuery()); 35 + $query = new DivinerAtomQuery(); 36 36 37 37 $books = $saved->getParameter('bookPHIDs'); 38 38 if ($books) {
+1 -1
src/applications/files/controller/PhabricatorFileViewController.php
··· 221 221 $request = $this->getRequest(); 222 222 $viewer = $request->getUser(); 223 223 224 - $tab_group = id(new PHUITabGroupView()); 224 + $tab_group = new PHUITabGroupView(); 225 225 $box->addTabGroup($tab_group); 226 226 227 227 $finfo = new PHUIPropertyListView();
+1 -1
src/applications/fund/query/FundBackerSearchEngine.php
··· 33 33 } 34 34 35 35 public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) { 36 - $query = id(new FundBackerQuery()); 36 + $query = new FundBackerQuery(); 37 37 38 38 $query->withStatuses(array(FundBacker::STATUS_PURCHASED)); 39 39
+1 -1
src/applications/harbormaster/controller/HarbormasterBuildViewController.php
··· 494 494 ), 495 495 ); 496 496 497 - $base_uri = id(new PhutilURI($build->getURI().$generation.'/')); 497 + $base_uri = new PhutilURI($build->getURI().$generation.'/'); 498 498 499 499 $links = array(); 500 500 foreach ($options as $option) {
+1 -1
src/applications/harbormaster/controller/HarbormasterBuildableViewController.php
··· 177 177 $targets = $build->getBuildTargets(); 178 178 179 179 if ($targets) { 180 - $target_list = id(new PHUIStatusListView()); 180 + $target_list = new PHUIStatusListView(); 181 181 foreach ($targets as $target) { 182 182 $status = $target->getTargetStatus(); 183 183 $icon = HarbormasterBuildTarget::getBuildTargetStatusIcon($status);
+2 -2
src/applications/herald/controller/HeraldTranscriptController.php
··· 266 266 267 267 $cond_xscripts = $xscript->getConditionTranscriptsForRule($rule_id); 268 268 269 - $cond_list = id(new PHUIStatusListView()); 269 + $cond_list = new PHUIStatusListView(); 270 270 $cond_list->addItem( 271 271 id(new PHUIStatusItemView()) 272 272 ->setTarget(phutil_tag('strong', array(), pht('Conditions')))); ··· 354 354 355 355 $name = pht('Action: %s', $name); 356 356 357 - $action_list = id(new PHUIStatusListView()); 357 + $action_list = new PHUIStatusListView(); 358 358 $action_list->addItem( 359 359 id(new PHUIStatusItemView()) 360 360 ->setTarget(phutil_tag('strong', array(), $name)));
+1 -1
src/applications/herald/query/HeraldTranscriptSearchEngine.php
··· 35 35 } 36 36 37 37 public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) { 38 - $query = id(new HeraldTranscriptQuery()); 38 + $query = new HeraldTranscriptQuery(); 39 39 40 40 $object_monograms = $saved->getParameter('objectMonograms'); 41 41 if ($object_monograms) {
+1 -1
src/applications/legalpad/controller/LegalpadDocumentSignatureListController.php
··· 26 26 $this->document = $document; 27 27 } 28 28 29 - $engine = id(new LegalpadDocumentSignatureSearchEngine()); 29 + $engine = new LegalpadDocumentSignatureSearchEngine(); 30 30 31 31 if ($this->document) { 32 32 $engine->setDocument($this->document);
+1 -1
src/applications/legalpad/query/LegalpadDocumentSignatureSearchEngine.php
··· 114 114 } 115 115 116 116 public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) { 117 - $query = id(new LegalpadDocumentSignatureQuery()); 117 + $query = new LegalpadDocumentSignatureQuery(); 118 118 119 119 $signer_phids = $saved->getParameter('signerPHIDs', array()); 120 120 if ($signer_phids) {
+2 -2
src/applications/meta/controller/PhabricatorApplicationDetailViewController.php
··· 107 107 PhabricatorApplication $application) { 108 108 109 109 $viewer = $this->getViewer(); 110 - $properties = id(new PHUIPropertyListView()); 110 + $properties = new PHUIPropertyListView(); 111 111 112 112 $properties->addProperty( 113 113 pht('Description'), ··· 173 173 PhabricatorApplication $application) { 174 174 175 175 $viewer = $this->getViewer(); 176 - $properties = id(new PHUIPropertyListView()); 176 + $properties = new PHUIPropertyListView(); 177 177 178 178 $header = id(new PHUIHeaderView()) 179 179 ->setHeader(pht('Policies'));
+2 -2
src/applications/metamta/controller/PhabricatorMetaMTAMailViewController.php
··· 248 248 $delivery = pht('Voided'); 249 249 } 250 250 251 - $reasons = id(new PHUIStatusListView()); 251 + $reasons = new PHUIStatusListView(); 252 252 253 253 $reason_codes = $actor['reasons']; 254 254 if (!$reason_codes) { ··· 369 369 } 370 370 $rules = isort($rules, 'strength'); 371 371 372 - $routing_detail = id(new PHUIStatusListView()); 372 + $routing_detail = new PHUIStatusListView(); 373 373 foreach ($rules as $rule) { 374 374 $const = $rule['routingRule']; 375 375 $phids = $rule['phids'];
+1 -1
src/applications/notification/controller/PhabricatorNotificationPanelController.php
··· 18 18 $stories = $query->execute(); 19 19 20 20 $clear_ui_class = 'phabricator-notification-clear-all'; 21 - $clear_uri = id(new PhutilURI('/notification/clear/')); 21 + $clear_uri = new PhutilURI('/notification/clear/'); 22 22 if ($stories) { 23 23 $builder = id(new PhabricatorNotificationBuilder($stories)) 24 24 ->setUser($viewer);
+1 -1
src/applications/notification/query/PhabricatorNotificationSearchEngine.php
··· 107 107 break; 108 108 } 109 109 110 - $clear_uri = id(new PhutilURI('/notification/clear/')); 110 + $clear_uri = new PhutilURI('/notification/clear/'); 111 111 if ($notifications) { 112 112 $builder = id(new PhabricatorNotificationBuilder($notifications)) 113 113 ->setUser($viewer);
+1 -1
src/applications/packages/typeahead/PhabricatorPackagesPackageDatasource.php
··· 19 19 $viewer = $this->getViewer(); 20 20 $raw_query = $this->getRawQuery(); 21 21 22 - $package_query = id(new PhabricatorPackagesPackageQuery()); 22 + $package_query = new PhabricatorPackagesPackageQuery(); 23 23 $packages = $this->executeQuery($package_query); 24 24 25 25 $results = array();
+1 -1
src/applications/packages/typeahead/PhabricatorPackagesPublisherDatasource.php
··· 19 19 $viewer = $this->getViewer(); 20 20 $raw_query = $this->getRawQuery(); 21 21 22 - $publisher_query = id(new PhabricatorPackagesPublisherQuery()); 22 + $publisher_query = new PhabricatorPackagesPublisherQuery(); 23 23 $publishers = $this->executeQuery($publisher_query); 24 24 25 25 $results = array();
+1 -1
src/applications/phortune/query/PhortuneChargeSearchEngine.php
··· 34 34 } 35 35 36 36 public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) { 37 - $query = id(new PhortuneChargeQuery()); 37 + $query = new PhortuneChargeQuery(); 38 38 39 39 $viewer = $this->requireViewer(); 40 40
+1 -1
src/applications/phortune/query/PhortuneSubscriptionSearchEngine.php
··· 44 44 } 45 45 46 46 public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) { 47 - $query = id(new PhortuneSubscriptionQuery()); 47 + $query = new PhortuneSubscriptionQuery(); 48 48 49 49 $viewer = $this->requireViewer(); 50 50
+1 -1
src/applications/phriction/controller/PhrictionEditController.php
··· 314 314 ->addCancelButton($cancel_uri) 315 315 ->setValue(pht('Save Draft'))); 316 316 } else { 317 - $submit = id(new AphrontFormSubmitControl()); 317 + $submit = new AphrontFormSubmitControl(); 318 318 319 319 if (!$is_new) { 320 320 $draft_button = id(new PHUIButtonView())
+1 -1
src/applications/phurl/typeahead/PhabricatorPhurlURLDatasource.php
··· 16 16 } 17 17 18 18 public function loadResults() { 19 - $query = id(new PhabricatorPhurlURLQuery()); 19 + $query = new PhabricatorPhurlURLQuery(); 20 20 $urls = $this->executeQuery($query); 21 21 $results = array(); 22 22 foreach ($urls as $url) {
+1 -1
src/applications/ponder/controller/PonderAnswerSaveController.php
··· 54 54 55 55 // Answer Editor 56 56 57 - $template = id(new PonderAnswerTransaction()); 57 + $template = new PonderAnswerTransaction(); 58 58 $xactions = array(); 59 59 60 60 $xactions[] = id(clone $template)
+1 -1
src/applications/project/editor/PhabricatorProjectTransactionEditor.php
··· 227 227 $member_type); 228 228 229 229 if ($project_members) { 230 - $editor = id(new PhabricatorEdgeEditor()); 230 + $editor = new PhabricatorEdgeEditor(); 231 231 foreach ($project_members as $phid) { 232 232 $editor->addEdge($object->getPHID(), $member_type, $phid); 233 233 }
+1 -1
src/applications/project/order/PhabricatorProjectColumnAuthorOrder.php
··· 112 112 $author_icon = 'fa-user'; 113 113 $author_color = 'bluegrey'; 114 114 115 - $icon_view = id(new PHUIIconView()); 115 + $icon_view = new PHUIIconView(); 116 116 117 117 if ($author_image) { 118 118 $icon_view->setImage($author_image);
+1 -1
src/applications/project/order/PhabricatorProjectColumnOwnerOrder.php
··· 148 148 $owner_icon = 'fa-user'; 149 149 $owner_color = 'bluegrey'; 150 150 151 - $icon_view = id(new PHUIIconView()); 151 + $icon_view = new PHUIIconView(); 152 152 153 153 if ($owner_image) { 154 154 $icon_view->setImage($owner_image);
+1 -1
src/applications/project/view/PhabricatorProjectCardView.php
··· 80 80 $description = $description_field->getFieldValue(); 81 81 if (phutil_nonempty_string($description)) { 82 82 $description = PhabricatorMarkupEngine::summarizeSentence($description); 83 - $description = id(new PHUIRemarkupView($viewer, $description)); 83 + $description = new PHUIRemarkupView($viewer, $description); 84 84 85 85 $description = phutil_tag( 86 86 'div',
+1 -1
src/applications/repository/engine/PhabricatorRepositoryRefEngine.php
··· 199 199 } 200 200 201 201 if ($updates) { 202 - $position_table = id(new PhabricatorRepositoryRefPosition()); 202 + $position_table = new PhabricatorRepositoryRefPosition(); 203 203 $conn = $position_table->establishConnection('w'); 204 204 205 205 $position_table->openTransaction();
+1 -1
src/applications/repository/management/PhabricatorRepositoryManagementParentsWorkflow.php
··· 94 94 'Found %s total commit(s); updating...', 95 95 phutil_count($graph))); 96 96 97 - $commit_table = id(new PhabricatorRepositoryCommit()); 97 + $commit_table = new PhabricatorRepositoryCommit(); 98 98 $commit_table_name = $commit_table->getTableName(); 99 99 $conn_w = $commit_table->establishConnection('w'); 100 100
+1 -1
src/applications/repository/storage/PhabricatorRepository.php
··· 1708 1708 1709 1709 $window_start = (PhabricatorTime::getNow() + $minimum); 1710 1710 1711 - $table = id(new PhabricatorRepositoryCommit()); 1711 + $table = new PhabricatorRepositoryCommit(); 1712 1712 $last_commit = queryfx_one( 1713 1713 $table->establishConnection('r'), 1714 1714 'SELECT epoch FROM %T
+1 -1
src/applications/search/engine/PhabricatorProfileMenuEngine.php
··· 736 736 $item, 737 737 PhabricatorPolicyCapability::CAN_EDIT); 738 738 739 - $view = id(new PHUIObjectItemView()); 739 + $view = new PHUIObjectItemView(); 740 740 741 741 $name = $item->getDisplayName(); 742 742 $type = $item->getMenuItemTypeName();
+1 -1
src/applications/settings/panel/PhabricatorPasswordSettingsPanel.php
··· 186 186 id(new AphrontFormSubmitControl()) 187 187 ->setValue(pht('Change Password'))); 188 188 189 - $properties = id(new PHUIPropertyListView()); 189 + $properties = new PHUIPropertyListView(); 190 190 191 191 $properties->addProperty( 192 192 pht('Current Algorithm'),
+1 -1
src/applications/slowvote/controller/PhabricatorSlowvoteEditController.php
··· 83 83 } 84 84 } 85 85 86 - $template = id(new PhabricatorSlowvoteTransaction()); 86 + $template = new PhabricatorSlowvoteTransaction(); 87 87 $xactions = array(); 88 88 89 89 if ($is_new) {
+1 -1
src/applications/spaces/typeahead/PhabricatorSpacesNamespaceDatasource.php
··· 16 16 } 17 17 18 18 public function loadResults() { 19 - $query = id(new PhabricatorSpacesNamespaceQuery()); 19 + $query = new PhabricatorSpacesNamespaceQuery(); 20 20 21 21 $spaces = $this->executeQuery($query); 22 22 $results = array();
+2 -2
src/applications/tokens/controller/PhabricatorTokenLeaderController.php
··· 14 14 $pager->setURI($request->getRequestURI(), 'page'); 15 15 $pager->setOffset($request->getInt('page')); 16 16 17 - $query = id(new PhabricatorTokenReceiverQuery()); 17 + $query = new PhabricatorTokenReceiverQuery(); 18 18 $objects = $query->setViewer($viewer)->executeWithOffsetPager($pager); 19 19 $counts = $query->getTokenCounts(); 20 20 ··· 31 31 $list = new PHUIObjectItemListView(); 32 32 foreach ($phids as $object) { 33 33 $count = idx($counts, $object, 0); 34 - $item = id(new PHUIObjectItemView()); 34 + $item = new PHUIObjectItemView(); 35 35 $handle = $handles[$object]; 36 36 37 37 $item->setHeader($handle->getFullName());
+1 -1
src/applications/tokens/query/PhabricatorTokenGivenSearchEngine.php
··· 64 64 $handle = $handles[$token_given->getObjectPHID()]; 65 65 $token = idx($tokens, $token_given->getTokenPHID()); 66 66 67 - $item = id(new PHUIObjectItemView()); 67 + $item = new PHUIObjectItemView(); 68 68 $item->setHeader($handle->getFullName()); 69 69 $item->setHref($handle->getURI()); 70 70
+1 -1
src/applications/transactions/draft/PhabricatorDraftEngine.php
··· 84 84 $has_draft = $this->hasAnyDraftContent(); 85 85 86 86 $draft_type = PhabricatorObjectHasDraftEdgeType::EDGECONST; 87 - $editor = id(new PhabricatorEdgeEditor()); 87 + $editor = new PhabricatorEdgeEditor(); 88 88 89 89 if ($has_draft) { 90 90 $editor->addEdge($object_phid, $draft_type, $viewer_phid);
+1 -1
src/applications/transactions/editfield/PhabricatorColumnsEditField.php
··· 15 15 } 16 16 17 17 protected function newControl() { 18 - $control = id(new AphrontFormHandlesControl()); 18 + $control = new AphrontFormHandlesControl(); 19 19 $control->setIsInvisible(true); 20 20 21 21 return $control;
+1 -1
src/applications/transactions/editfield/PhabricatorHandlesEditField.php
··· 25 25 } 26 26 27 27 protected function newControl() { 28 - $control = id(new AphrontFormHandlesControl()); 28 + $control = new AphrontFormHandlesControl(); 29 29 30 30 if ($this->getIsInvisible()) { 31 31 $control->setIsInvisible(true);
+1 -1
src/applications/transactions/typeahead/PhabricatorEditEngineDatasource.php
··· 25 25 } 26 26 27 27 private function buildResults() { 28 - $query = id(new PhabricatorEditEngineConfigurationQuery()); 28 + $query = new PhabricatorEditEngineConfigurationQuery(); 29 29 30 30 $forms = $this->executeQuery($query); 31 31 $results = array();
+1 -1
src/applications/uiexample/examples/PHUITimelineExample.php
··· 210 210 } 211 211 } 212 212 213 - $timeline = id(new PHUITimelineView()); 213 + $timeline = new PHUITimelineView(); 214 214 $timeline->setViewer($user); 215 215 foreach ($events as $event) { 216 216 $timeline->addEvent($event);
+1 -1
src/infrastructure/graph/PhabricatorObjectGraph.php
··· 203 203 204 204 $ancestry = array_select_keys($ancestry, $order); 205 205 206 - $graph_view = id(new PHUIDiffGraphView()); 206 + $graph_view = new PHUIDiffGraphView(); 207 207 208 208 $height = $this->getHeight(); 209 209 if ($height !== null) {
+1 -1
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php
··· 113 113 public function didExecute(PhutilArgumentParser $args) {} 114 114 115 115 private function loadSchemata(PhabricatorStorageManagementAPI $api) { 116 - $query = id(new PhabricatorConfigSchemaQuery()); 116 + $query = new PhabricatorConfigSchemaQuery(); 117 117 118 118 $ref = $api->getRef(); 119 119 $ref_key = $ref->getRefKey();
+1 -1
src/view/form/control/AphrontFormDateControlValue.php
··· 268 268 $time) { 269 269 270 270 $zone = $this->getTimezone(); 271 - $date_time = id(new DateTime("{$year}-{$month}-{$day} {$time}", $zone)); 271 + $date_time = new DateTime("{$year}-{$month}-{$day} {$time}", $zone); 272 272 273 273 return array( 274 274 $date_time->format($this->getDateFormat()),
+1 -1
src/view/phui/PHUIObjectBoxView.php
··· 192 192 $showhide = null; 193 193 if ($this->showAction !== null) { 194 194 if (!$header) { 195 - $header = id(new PHUIHeaderView()); 195 + $header = new PHUIHeaderView(); 196 196 } 197 197 198 198 Javelin::initBehavior('phabricator-reveal-content');
+1 -1
src/view/phui/calendar/PHUICalendarMonthView.php
··· 430 430 431 431 } 432 432 433 - $header = id(new PHUIHeaderView()); 433 + $header = new PHUIHeaderView(); 434 434 435 435 if ($button_bar) { 436 436 $header->setButtonBar($button_bar);