@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
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove several unused private functions

Summary: These private functions are not called within their class.

Test Plan:
Grep; run static code analysis.

Additionally, this still works:

arc unit src/applications/conpherence/__tests__/ConpherenceRoomTestCase.php

These pages still work:

/conpherence/search/

/differential/

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

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

-111
-18
src/applications/conpherence/__tests__/ConpherenceRoomTestCase.php
··· 124 124 return $conpherence; 125 125 } 126 126 127 - private function changeEditPolicy( 128 - PhabricatorUser $actor, 129 - ConpherenceThread $room, 130 - $policy) { 131 - 132 - $xactions = array(); 133 - $xactions[] = id(new ConpherenceTransaction()) 134 - ->setTransactionType(PhabricatorTransactions::TYPE_EDIT_POLICY) 135 - ->setNewValue($policy); 136 - 137 - id(new ConpherenceEditor()) 138 - ->setActor($actor) 139 - ->setContentSource($this->newContentSource()) 140 - ->setContinueOnNoEffect(true) 141 - ->applyTransactions($room, $xactions); 142 - } 143 - 144 - 145 127 }
-14
src/applications/conpherence/view/ConpherenceThreadListView.php
··· 155 155 return $item; 156 156 } 157 157 158 - private function getNoRoomsMenuItem() { 159 - $message = phutil_tag( 160 - 'div', 161 - array( 162 - 'class' => 'no-conpherences-menu-item', 163 - ), 164 - pht('No Rooms')); 165 - 166 - return id(new PHUIListItemView()) 167 - ->setType(PHUIListItemView::TYPE_CUSTOM) 168 - ->setName($message); 169 - } 170 - 171 - 172 158 }
-29
src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php
··· 562 562 ); 563 563 } 564 564 565 - private function selectDaemonPIDs(array $daemons, array $pids) { 566 - $console = PhutilConsole::getConsole(); 567 - 568 - $running_pids = array_fuse(mpull($daemons, 'getPID')); 569 - if (!$pids) { 570 - $select_pids = $running_pids; 571 - } else { 572 - // We were given a PID or set of PIDs to kill. 573 - $select_pids = array(); 574 - foreach ($pids as $key => $pid) { 575 - if (!preg_match('/^\d+$/', $pid)) { 576 - $console->writeErr(pht("PID '%s' is not a valid PID.", $pid)."\n"); 577 - continue; 578 - } else if (empty($running_pids[$pid])) { 579 - $console->writeErr( 580 - "%s\n", 581 - pht( 582 - 'PID "%d" is not a known daemon PID.', 583 - $pid)); 584 - continue; 585 - } else { 586 - $select_pids[$pid] = $pid; 587 - } 588 - } 589 - } 590 - 591 - return $select_pids; 592 - } 593 - 594 565 protected function getOverseerProcessRefs() { 595 566 $query = id(new PhutilProcessQuery()) 596 567 ->withIsOverseer(true);
-5
src/applications/differential/editor/DifferentialTransactionEditor.php
··· 1384 1384 return implode("\n", $filenames); 1385 1385 } 1386 1386 1387 - private function renderPatchHTMLForMail($patch) { 1388 - return phutil_tag('pre', 1389 - array('style' => 'font-family: monospace;'), $patch); 1390 - } 1391 - 1392 1387 private function buildPatchForMail(DifferentialDiff $diff, $byte_limit) { 1393 1388 $format = PhabricatorEnv::getEnvConfig('metamta.differential.patch-format'); 1394 1389
-12
src/applications/differential/query/DifferentialRevisionSearchEngine.php
··· 172 172 return parent::buildSavedQueryFromBuiltin($query_key); 173 173 } 174 174 175 - private function getStatusOptions() { 176 - return array( 177 - DifferentialLegacyQuery::STATUS_ANY => pht('All'), 178 - DifferentialLegacyQuery::STATUS_OPEN => pht('Open'), 179 - DifferentialLegacyQuery::STATUS_ACCEPTED => pht('Accepted'), 180 - DifferentialLegacyQuery::STATUS_NEEDS_REVIEW => pht('Needs Review'), 181 - DifferentialLegacyQuery::STATUS_NEEDS_REVISION => pht('Needs Revision'), 182 - DifferentialLegacyQuery::STATUS_CLOSED => pht('Closed'), 183 - DifferentialLegacyQuery::STATUS_ABANDONED => pht('Abandoned'), 184 - ); 185 - } 186 - 187 175 protected function renderResultList( 188 176 array $revisions, 189 177 PhabricatorSavedQuery $query,
-7
src/applications/differential/xaction/DifferentialRevisionVoidTransaction.php
··· 82 82 return true; 83 83 } 84 84 85 - private function getVoidableStatuses() { 86 - return array( 87 - DifferentialReviewerStatus::STATUS_ACCEPTED, 88 - DifferentialReviewerStatus::STATUS_REJECTED, 89 - ); 90 - } 91 - 92 85 }
-4
src/applications/diffusion/doorkeeper/DiffusionDoorkeeperCommitFeedStoryPublisher.php
··· 7 7 private $activePHIDs; 8 8 private $passivePHIDs; 9 9 10 - private function getAuditRequests() { 11 - return $this->auditRequests; 12 - } 13 - 14 10 public function canPublishStory(PhabricatorFeedStory $story, $object) { 15 11 return 16 12 ($story instanceof PhabricatorApplicationTransactionFeedStory) &&
-4
src/view/phui/PHUIPagerView.php
··· 76 76 + ($this->hasMorePages ? 1 : 0); 77 77 } 78 78 79 - private function isExactCountKnown() { 80 - return $this->count !== null; 81 - } 82 - 83 79 /** 84 80 * A common paging strategy is to select one extra record and use that to 85 81 * indicate that there's an additional page (this doesn't give you a
-18
src/view/phui/calendar/PHUICalendarDayView.php
··· 296 296 return $header; 297 297 } 298 298 299 - private function updateEventsFromCluster($cluster, $hourly_events) { 300 - $cluster_size = count($cluster); 301 - $n = 0; 302 - foreach ($cluster as $cluster_member) { 303 - $event_id = $cluster_member->getEventID(); 304 - $offset = (($n / $cluster_size) * 100).'%'; 305 - $width = ((1 / $cluster_size) * 100).'%'; 306 - 307 - if (isset($hourly_events[$event_id])) { 308 - $hourly_events[$event_id]['offset'] = $offset; 309 - $hourly_events[$event_id]['width'] = $width; 310 - } 311 - $n++; 312 - } 313 - 314 - return $hourly_events; 315 - } 316 - 317 299 // returns DateTime of each hour in the day 318 300 private function getHoursOfDay() { 319 301 $included_datetimes = array();