@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

Fix errors found by PHPStan

Test Plan: Ran `phpstan analyze -a autoload.php phabricator/src`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, hach-que

Differential Revision: https://secure.phabricator.com/D17371

authored by

Jakub Vrana and committed by
vrana
a778151f b2739710

+92 -147
+1 -1
src/applications/auth/controller/PhabricatorAuthUnlinkController.php
··· 61 61 return id(new AphrontRedirectResponse())->setURI($this->getDoneURI()); 62 62 } 63 63 64 - return $this->renderConfirmDialog($account); 64 + return $this->renderConfirmDialog(); 65 65 } 66 66 67 67 private function getDoneURI() {
+1 -1
src/applications/badges/controller/PhabricatorBadgesAwardController.php
··· 40 40 ->setTransactionType(PhabricatorBadgesTransaction::TYPE_AWARD) 41 41 ->setNewValue($award_phids); 42 42 43 - $editor = id(new PhabricatorBadgesEditor($badge)) 43 + $editor = id(new PhabricatorBadgesEditor()) 44 44 ->setActor($viewer) 45 45 ->setContentSourceFromRequest($request) 46 46 ->setContinueOnNoEffect(true)
+1 -1
src/applications/badges/controller/PhabricatorBadgesEditRecipientsController.php
··· 40 40 ->setTransactionType(PhabricatorBadgesTransaction::TYPE_AWARD) 41 41 ->setNewValue($award_phids); 42 42 43 - $editor = id(new PhabricatorBadgesEditor($badge)) 43 + $editor = id(new PhabricatorBadgesEditor()) 44 44 ->setActor($viewer) 45 45 ->setContentSourceFromRequest($request) 46 46 ->setContinueOnNoEffect(true)
+1 -1
src/applications/badges/controller/PhabricatorBadgesRemoveRecipientsController.php
··· 37 37 ->setTransactionType(PhabricatorBadgesTransaction::TYPE_REVOKE) 38 38 ->setNewValue(array($remove_phid)); 39 39 40 - $editor = id(new PhabricatorBadgesEditor($badge)) 40 + $editor = id(new PhabricatorBadgesEditor()) 41 41 ->setActor($viewer) 42 42 ->setContentSourceFromRequest($request) 43 43 ->setContinueOnNoEffect(true)
+1 -1
src/applications/base/PhabricatorApplication.php
··· 251 251 } 252 252 253 253 final protected function getInboundEmailSupportLink() { 254 - return PhabricatorEnv::getDocLink('Configuring Inbound Email'); 254 + return PhabricatorEnv::getDoclink('Configuring Inbound Email'); 255 255 } 256 256 257 257 public function getAppEmailBlurb() {
+1 -3
src/applications/calendar/__tests__/CalendarTimeUtilTestCase.php
··· 7 7 $u->overrideTimezoneIdentifier('America/Los_Angeles'); 8 8 $days = $this->getAllDays(); 9 9 foreach ($days as $day) { 10 - $data = CalendarTimeUtil::getCalendarWidgetTimestamps( 11 - $u, 12 - $day); 10 + $data = CalendarTimeUtil::getTimestamps($u, $day, 1); 13 11 14 12 $this->assertEqual( 15 13 '000000',
+1 -1
src/applications/calendar/storage/PhabricatorCalendarExternalInvitee.php
··· 14 14 PhabricatorUser $actor, $event) { 15 15 return id(new PhabricatorCalendarEventInvitee()) 16 16 ->setInviterPHID($actor->getPHID()) 17 - ->setStatus(self::STATUS_INVITED) 17 + ->setStatus(PhabricatorCalendarEventInvitee::STATUS_INVITED) 18 18 ->setEventPHID($event->getPHID()); 19 19 } 20 20
+4 -4
src/applications/conduit/controller/PhabricatorConduitController.php
··· 154 154 $parts[] = "\n\n"; 155 155 156 156 $parts[] = 'require_once '; 157 - $parts[] = phutil_var_export($libphutil_path, true); 157 + $parts[] = phutil_var_export($libphutil_path); 158 158 $parts[] = ";\n\n"; 159 159 160 160 $parts[] = '$api_token = "'; ··· 168 168 $parts[] = ');'; 169 169 } else { 170 170 $params = $this->simplifyParams($params); 171 - $params = phutil_var_export($params, true); 171 + $params = phutil_var_export($params); 172 172 $parts[] = phutil_tag('strong', array('class' => 'real'), $params); 173 173 $parts[] = ';'; 174 174 } ··· 178 178 $parts[] = phutil_tag( 179 179 'strong', 180 180 array('class' => 'real'), 181 - phutil_var_export(PhabricatorEnv::getURI('/'), true)); 181 + phutil_var_export(PhabricatorEnv::getURI('/'))); 182 182 $parts[] = ");\n"; 183 183 184 184 $parts[] = '$client->setConduitToken($api_token);'; ··· 188 188 $parts[] = phutil_tag( 189 189 'strong', 190 190 array('class' => 'real'), 191 - phutil_var_export($method->getAPIMethodName(), true)); 191 + phutil_var_export($method->getAPIMethodName())); 192 192 $parts[] = ', '; 193 193 $parts[] = '$api_parameters'; 194 194 $parts[] = ");\n";
+1 -1
src/applications/config/check/PhabricatorDaemonsSetupCheck.php
··· 16 16 ->execute(); 17 17 18 18 if (!$task_daemon) { 19 - $doc_href = PhabricatorEnv::getDocLink('Managing Daemons with phd'); 19 + $doc_href = PhabricatorEnv::getDoclink('Managing Daemons with phd'); 20 20 21 21 $summary = pht( 22 22 'You must start the Phabricator daemons to send email, rebuild '.
+1 -1
src/applications/config/check/PhabricatorPHPConfigSetupCheck.php
··· 14 14 protected function executeChecks() { 15 15 16 16 if (empty($_SERVER['REMOTE_ADDR'])) { 17 - $doc_href = PhabricatorEnv::getDocLink('Configuring a Preamble Script'); 17 + $doc_href = PhabricatorEnv::getDoclink('Configuring a Preamble Script'); 18 18 19 19 $summary = pht( 20 20 'You likely need to fix your preamble script so '.
+1 -1
src/applications/config/check/PhabricatorSecuritySetupCheck.php
··· 52 52 $file_key = 'security.alternate-file-domain'; 53 53 $file_domain = PhabricatorEnv::getEnvConfig($file_key); 54 54 if (!$file_domain) { 55 - $doc_href = PhabricatorEnv::getDocLink('Configuring a File Domain'); 55 + $doc_href = PhabricatorEnv::getDoclink('Configuring a File Domain'); 56 56 57 57 $this->newIssue('security.'.$file_key) 58 58 ->setName(pht('Alternate File Domain Not Configured'))
+1 -1
src/applications/config/check/PhabricatorStorageSetupCheck.php
··· 16 16 $this->checkS3(); 17 17 18 18 if (!$chunk_engine_active) { 19 - $doc_href = PhabricatorEnv::getDocLink('Configuring File Storage'); 19 + $doc_href = PhabricatorEnv::getDoclink('Configuring File Storage'); 20 20 21 21 $message = pht( 22 22 'Large file storage has not been configured, which will limit '.
+1 -1
src/applications/config/controller/PhabricatorConfigClusterDatabasesController.php
··· 21 21 ->setText(pht('Documentation'))); 22 22 23 23 $crumbs = $this 24 - ->buildApplicationCrumbs($nav) 24 + ->buildApplicationCrumbs() 25 25 ->addTextCrumb($title) 26 26 ->setBorder(true); 27 27
+1 -1
src/applications/config/controller/PhabricatorConfigClusterNotificationsController.php
··· 21 21 ->setText(pht('Documentation'))); 22 22 23 23 $crumbs = $this 24 - ->buildApplicationCrumbs($nav) 24 + ->buildApplicationCrumbs() 25 25 ->addTextCrumb($title) 26 26 ->setBorder(true); 27 27
+1 -1
src/applications/config/controller/PhabricatorConfigClusterRepositoriesController.php
··· 22 22 ->setText(pht('Documentation'))); 23 23 24 24 $crumbs = $this 25 - ->buildApplicationCrumbs($nav) 25 + ->buildApplicationCrumbs() 26 26 ->addTextCrumb(pht('Repository Servers')) 27 27 ->setBorder(true); 28 28
+1 -1
src/applications/config/controller/PhabricatorConfigIssueListController.php
··· 49 49 ->setProfileHeader(true); 50 50 51 51 $crumbs = $this 52 - ->buildApplicationCrumbs($nav) 52 + ->buildApplicationCrumbs() 53 53 ->addTextCrumb(pht('Setup Issues')) 54 54 ->setBorder(true); 55 55
+1 -1
src/applications/config/option/PhabricatorSyntaxHighlightingConfigOptions.php
··· 20 20 } 21 21 22 22 public function getOptions() { 23 - $caches_href = PhabricatorEnv::getDocLink('Managing Caches'); 23 + $caches_href = PhabricatorEnv::getDoclink('Managing Caches'); 24 24 25 25 return array( 26 26 $this->newOption(
+1
src/applications/config/schema/PhabricatorConfigKeySchema.php
··· 9 9 private $unique; 10 10 private $table; 11 11 private $indexType; 12 + private $property; 12 13 13 14 public function setIndexType($index_type) { 14 15 $this->indexType = $index_type;
-3
src/applications/conpherence/conduit/ConpherenceCreateThreadConduitAPIMethod.php
··· 50 50 if ($errors) { 51 51 foreach ($errors as $error_code) { 52 52 switch ($error_code) { 53 - case ConpherenceEditor::ERROR_EMPTY_TITLE: 54 - throw new ConduitException('ERR_EMPTY_TITLE'); 55 - break; 56 53 case ConpherenceEditor::ERROR_EMPTY_PARTICIPANTS: 57 54 throw new ConduitException('ERR_EMPTY_PARTICIPANT_PHIDS'); 58 55 break;
+1 -1
src/applications/dashboard/controller/PhabricatorDashboardManageController.php
··· 36 36 $crumbs->addTextCrumb(pht('Manage')); 37 37 38 38 $header = $this->buildHeaderView(); 39 - $curtain = $this->buildCurtainview($dashboard); 39 + $curtain = $this->buildCurtainView($dashboard); 40 40 $properties = $this->buildPropertyView($dashboard); 41 41 42 42 $timeline = $this->buildTransactionTimeline(
+1 -2
src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php
··· 88 88 89 89 public function renderPanel() { 90 90 $panel = $this->getPanel(); 91 - $viewer = $this->getViewer(); 92 91 93 92 if (!$panel) { 94 93 return $this->renderErrorPanel( ··· 117 116 } 118 117 } 119 118 120 - return $this->renderNormalPanel($viewer, $panel, $this); 119 + return $this->renderNormalPanel(); 121 120 } catch (Exception $ex) { 122 121 return $this->renderErrorPanel( 123 122 $panel->getName(),
+4 -4
src/applications/differential/customfield/DifferentialCustomField.php
··· 111 111 * @task diff 112 112 */ 113 113 public function renderDiffPropertyViewLabel(DifferentialDiff $diff) { 114 - if ($this->proxy) { 115 - return $this->proxy->renderDiffPropertyViewLabel($diff); 114 + if ($this->getProxy()) { 115 + return $this->getProxy()->renderDiffPropertyViewLabel($diff); 116 116 } 117 117 return $this->getFieldName(); 118 118 } ··· 122 122 * @task diff 123 123 */ 124 124 public function renderDiffPropertyViewValue(DifferentialDiff $diff) { 125 - if ($this->proxy) { 126 - return $this->proxy->renderDiffPropertyViewValue($diff); 125 + if ($this->getProxy()) { 126 + return $this->getProxy()->renderDiffPropertyViewValue($diff); 127 127 } 128 128 throw new PhabricatorCustomFieldImplementationIncompleteException($this); 129 129 }
+1 -1
src/applications/differential/query/DifferentialRevisionRequiredActionResultBucket.php
··· 20 20 21 21 $this->objects = $objects; 22 22 23 - $phids = $query->getEvaluatedParameter('responsiblePHIDs', array()); 23 + $phids = $query->getEvaluatedParameter('responsiblePHIDs'); 24 24 if (!$phids) { 25 25 throw new Exception( 26 26 pht(
+2 -2
src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php
··· 201 201 202 202 $effective_commit = $this->getEffectiveCommit($request); 203 203 if (!$effective_commit) { 204 - return $this->getEmptyResult(1); 204 + return $this->getEmptyResult(); 205 205 } 206 206 207 207 $raw_query = DiffusionRawDiffQuery::newFromDiffusionRequest($drequest) ··· 209 209 210 210 $raw_diff = $raw_query->executeInline(); 211 211 if (!$raw_diff) { 212 - return $this->getEmptyResult(2); 212 + return $this->getEmptyResult(); 213 213 } 214 214 215 215 $parser = $this->getDefaultParser();
+1 -1
src/applications/diffusion/controller/DiffusionBrowseController.php
··· 44 44 $is_file = ($reason == DiffusionBrowseResultSet::REASON_IS_FILE); 45 45 46 46 if ($is_file) { 47 - return $this->browseFile($results); 47 + return $this->browseFile(); 48 48 } else { 49 49 $paths = $results->getPaths(); 50 50 $paths = $pager->sliceResults($paths);
+1 -1
src/applications/diffusion/controller/DiffusionController.php
··· 357 357 $stable_commit = $drequest->getStableCommit(); 358 358 359 359 $stable_commit_hash = PhabricatorHash::digestForIndex($stable_commit); 360 - $readme_path_hash = PhabricatorHash::digestForindex($readme_path); 360 + $readme_path_hash = PhabricatorHash::digestForIndex($readme_path); 361 361 362 362 $cache = PhabricatorCaches::getMutableStructureCache(); 363 363 $cache_key = "diffusion".
+1 -1
src/applications/diffusion/controller/DiffusionHistoryController.php
··· 59 59 ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 60 60 ->setTable($history_table); 61 61 62 - $header = $this->buildHeader($drequest, $repository); 62 + $header = $this->buildHeader($drequest); 63 63 64 64 $crumbs = $this->buildCrumbs( 65 65 array(
+1 -1
src/applications/diffusion/management/DiffusionRepositoryStatusManagementPanel.php
··· 241 241 } 242 242 } 243 243 244 - $doc_href = PhabricatorEnv::getDocLink('Managing Daemons with phd'); 244 + $doc_href = PhabricatorEnv::getDoclink('Managing Daemons with phd'); 245 245 246 246 $daemon_instructions = pht( 247 247 'Use %s to start daemons. See %s.',
+1 -1
src/applications/diffusion/query/DiffusionCommitRequiredActionResultBucket.php
··· 17 17 18 18 $this->objects = $objects; 19 19 20 - $phids = $query->getEvaluatedParameter('responsiblePHIDs', array()); 20 + $phids = $query->getEvaluatedParameter('responsiblePHIDs'); 21 21 if (!$phids) { 22 22 throw new Exception( 23 23 pht(
+1 -1
src/applications/diviner/atom/DivinerAtom.php
··· 43 43 $this->getContext(), 44 44 $this->getName(), 45 45 $this->getFile(), 46 - sprintf('%08', $this->getLine()), 46 + sprintf('%08d', $this->getLine()), 47 47 )); 48 48 } 49 49
+1 -1
src/applications/diviner/renderer/DivinerDefaultRenderer.php
··· 94 94 95 95 $this->pushAtomStack($atom); 96 96 $description = $engine->markupText($text); 97 - $this->popAtomStack($atom); 97 + $this->popAtomStack(); 98 98 99 99 return phutil_tag( 100 100 'div',
+1 -1
src/applications/diviner/workflow/DivinerWorkflow.php
··· 61 61 } 62 62 63 63 foreach (idx($book, 'groups', array()) as $group) { 64 - PhutilTypeSpec::checkmap( 64 + PhutilTypeSpec::checkMap( 65 65 $group, 66 66 array( 67 67 'name' => 'string',
+1 -1
src/applications/herald/controller/HeraldController.php
··· 3 3 abstract class HeraldController extends PhabricatorController { 4 4 5 5 public function buildApplicationMenu() { 6 - return $this->buildSideNavView(true)->getMenu(); 6 + return $this->buildSideNavView()->getMenu(); 7 7 } 8 8 9 9 protected function buildApplicationCrumbs() {
-5
src/applications/herald/query/HeraldRuleQuery.php
··· 40 40 return $this; 41 41 } 42 42 43 - public function withExecutableRules($executable) { 44 - $this->executable = $executable; 45 - return $this; 46 - } 47 - 48 43 public function withDisabled($disabled) { 49 44 $this->disabled = $disabled; 50 45 return $this;
+1 -1
src/applications/legalpad/controller/LegalpadDocumentEditController.php
··· 213 213 ->setPolicies($policies) 214 214 ->setName('can_edit')); 215 215 216 - $crumbs = $this->buildApplicationCrumbs($this->buildSideNav()); 216 + $crumbs = $this->buildApplicationCrumbs(); 217 217 $submit = new AphrontFormSubmitControl(); 218 218 if ($is_create) { 219 219 $submit->setValue(pht('Create Document'));
+1 -1
src/applications/legalpad/controller/LegalpadDocumentManageController.php
··· 54 54 55 55 $add_comment = $this->buildAddCommentView($document, $comment_form_id); 56 56 57 - $crumbs = $this->buildApplicationCrumbs($this->buildSideNav()); 57 + $crumbs = $this->buildApplicationCrumbs(); 58 58 $crumbs->addTextCrumb( 59 59 $document->getMonogram(), 60 60 '/'.$document->getMonogram());
-3
src/applications/legalpad/storage/LegalpadDocumentBody.php
··· 52 52 case self::MARKUP_FIELD_TEXT: 53 53 $text = $this->getText(); 54 54 break; 55 - case self::MARKUP_FIELD_TITLE: 56 - $text = $this->getTitle(); 57 - break; 58 55 default: 59 56 throw new Exception(pht('Unknown field: %s', $field)); 60 57 break;
+3 -1
src/applications/lipsum/generator/PhabricatorTestDataGenerator.php
··· 98 98 ->loadOneWhere('1 = 1 ORDER BY RAND() LIMIT 1'); 99 99 } catch (PhutilMissingSymbolException $ex) { 100 100 throw new PhutilMissingSymbolException( 101 + $classname, 102 + pht('class'), 101 103 pht( 102 - 'Unable to load symbol %s: this class does not exit.', 104 + 'Unable to load symbol %s: this class does not exist.', 103 105 $classname)); 104 106 } 105 107 }
+1 -1
src/applications/maniphest/controller/ManiphestController.php
··· 3 3 abstract class ManiphestController extends PhabricatorController { 4 4 5 5 public function buildApplicationMenu() { 6 - return $this->buildSideNavView(true)->getMenu(); 6 + return $this->buildSideNavView()->getMenu(); 7 7 } 8 8 9 9 public function buildSideNavView() {
+1 -1
src/applications/maniphest/controller/ManiphestTaskDetailController.php
··· 219 219 220 220 $status = $task->getStatus(); 221 221 $status_name = ManiphestTaskStatus::renderFullDescription( 222 - $status, $priority_name, $priority_color); 222 + $status, $priority_name); 223 223 $view->addProperty(PHUIHeaderView::PROPERTY_STATUS, $status_name); 224 224 225 225 $view->setHeaderIcon(ManiphestTaskStatus::getStatusIcon(
+1 -2
src/applications/maniphest/field/ManiphestConfiguredCustomField.php
··· 10 10 11 11 public function createFields($object) { 12 12 $config = PhabricatorEnv::getEnvConfig( 13 - 'maniphest.custom-field-definitions', 14 - array()); 13 + 'maniphest.custom-field-definitions'); 15 14 $fields = PhabricatorStandardCustomField::buildStandardFields( 16 15 $this, 17 16 $config);
+1 -1
src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php
··· 15 15 $this->mailer = new PHPMailer($use_exceptions = true); 16 16 $this->mailer->CharSet = 'utf-8'; 17 17 18 - $encoding = PhabricatorEnv::getEnvConfig('phpmailer.smtp-encoding', '8bit'); 18 + $encoding = PhabricatorEnv::getEnvConfig('phpmailer.smtp-encoding'); 19 19 $this->mailer->Encoding = $encoding; 20 20 21 21 // By default, PHPMailer sends one mail per recipient. We handle
+1 -1
src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerLiteAdapter.php
··· 18 18 $this->mailer = new PHPMailerLite($use_exceptions = true); 19 19 $this->mailer->CharSet = 'utf-8'; 20 20 21 - $encoding = PhabricatorEnv::getEnvConfig('phpmailer.smtp-encoding', '8bit'); 21 + $encoding = PhabricatorEnv::getEnvConfig('phpmailer.smtp-encoding'); 22 22 $this->mailer->Encoding = $encoding; 23 23 24 24 // By default, PHPMailerLite sends one mail per recipient. We handle
+1 -1
src/applications/metamta/storage/PhabricatorMetaMTAAttachment.php
··· 41 41 public function toDictionary() { 42 42 return array( 43 43 'filename' => $this->getFilename(), 44 - 'mimetype' => $this->getMimetype(), 44 + 'mimetype' => $this->getMimeType(), 45 45 'data' => $this->getData(), 46 46 ); 47 47 }
+1 -3
src/applications/owners/customfield/PhabricatorOwnersConfiguredCustomField.php
··· 9 9 } 10 10 11 11 public function createFields($object) { 12 - $config = PhabricatorEnv::getEnvConfig( 13 - 'owners.custom-field-definitions', 14 - array()); 12 + $config = PhabricatorEnv::getEnvConfig('owners.custom-field-definitions'); 15 13 16 14 $fields = PhabricatorStandardCustomField::buildStandardFields( 17 15 $this,
+1 -1
src/applications/paste/query/PhabricatorPasteQuery.php
··· 292 292 foreach ($pastes as $paste) { 293 293 $key = $this->getSnippetCacheKey($paste); 294 294 if (isset($caches[$key])) { 295 - $snippet_data = phutil_json_decode($caches[$key], true); 295 + $snippet_data = phutil_json_decode($caches[$key]); 296 296 $snippet = new PhabricatorPasteSnippet( 297 297 phutil_safe_html($snippet_data['content']), 298 298 $snippet_data['type'],
+2 -2
src/applications/paste/xaction/PhabricatorPasteTitleTransaction.php
··· 15 15 16 16 public function getTitle() { 17 17 $old = $this->getOldValue(); 18 - $new = $this->getNeWValue(); 18 + $new = $this->getNewValue(); 19 19 20 20 if (strlen($old) && strlen($new)) { 21 21 return pht( ··· 38 38 39 39 public function getTitleForFeed() { 40 40 $old = $this->getOldValue(); 41 - $new = $this->getNeWValue(); 41 + $new = $this->getNewValue(); 42 42 43 43 if (strlen($old) && strlen($new)) { 44 44 return pht(
+1 -1
src/applications/people/customfield/PhabricatorUserConfiguredCustomField.php
··· 11 11 public function createFields($object) { 12 12 return PhabricatorStandardCustomField::buildStandardFields( 13 13 $this, 14 - PhabricatorEnv::getEnvConfig('user.custom-field-definitions', array())); 14 + PhabricatorEnv::getEnvConfig('user.custom-field-definitions')); 15 15 } 16 16 17 17 public function newStorageObject() {
+1 -1
src/applications/phame/storage/PhamePost.php
··· 172 172 } 173 173 174 174 public function getSlug() { 175 - return PhabricatorSlug::normalizeProjectSlug($this->getTitle(), true); 175 + return PhabricatorSlug::normalizeProjectSlug($this->getTitle()); 176 176 } 177 177 178 178 public function getHeaderImageURI() {
+1 -1
src/applications/phid/utils.php
··· 5 5 * PhabricatorPHIDConstants::PHID_TYPE_UNKNOWN if it fails to look up the type 6 6 * 7 7 * @param phid Anything. 8 - * @return A value from PhabricatorPHIDConstants (ideally) 8 + * @return string A value from PhabricatorPHIDConstants (ideally) 9 9 */ 10 10 function phid_get_type($phid) { 11 11 $matches = null;
+1 -1
src/applications/pholio/controller/PholioMockViewController.php
··· 67 67 $timeline->setMock($mock); 68 68 69 69 $curtain = $this->buildCurtainView($mock); 70 - $details = $this->buildDescriptionView($mock, $engine); 70 + $details = $this->buildDescriptionView($mock); 71 71 72 72 require_celerity_resource('pholio-css'); 73 73 require_celerity_resource('pholio-inline-comments-css');
+1
src/applications/phragment/storage/PhragmentFragment.php
··· 10 10 protected $editPolicy; 11 11 12 12 private $latestVersion = self::ATTACHABLE; 13 + private $file = self::ATTACHABLE; 13 14 14 15 protected function getConfiguration() { 15 16 return array(
+1 -3
src/applications/phriction/conduit/PhrictionInfoConduitAPIMethod.php
··· 38 38 throw new ConduitException('ERR-BAD-DOCUMENT'); 39 39 } 40 40 41 - return $this->buildDocumentInfoDictionary( 42 - $document, 43 - $document->getContent()); 41 + return $this->buildDocumentInfoDictionary($document); 44 42 } 45 43 46 44 }
+1 -1
src/applications/policy/controller/PhabricatorPolicyExplainController.php
··· 85 85 return null; 86 86 } 87 87 88 - if (!PhabricatorSpacesNamespaceQuery::getSpacesExist($viewer)) { 88 + if (!PhabricatorSpacesNamespaceQuery::getSpacesExist()) { 89 89 return null; 90 90 } 91 91
+1 -1
src/applications/ponder/controller/PonderQuestionViewController.php
··· 83 83 ->setContentID($content_id) 84 84 ->setCount(count($xactions)); 85 85 86 - $crumbs = $this->buildApplicationCrumbs($this->buildSideNavView()); 86 + $crumbs = $this->buildApplicationCrumbs(); 87 87 $crumbs->addTextCrumb('Q'.$id, '/Q'.$id); 88 88 $crumbs->setBorder(true); 89 89
+1 -1
src/applications/project/controller/PhabricatorProjectMembersAddController.php
··· 48 48 '+' => array_fuse($member_phids), 49 49 )); 50 50 51 - $editor = id(new PhabricatorProjectTransactionEditor($project)) 51 + $editor = id(new PhabricatorProjectTransactionEditor()) 52 52 ->setActor($viewer) 53 53 ->setContentSourceFromRequest($request) 54 54 ->setContinueOnNoEffect(true)
+1 -1
src/applications/project/controller/PhabricatorProjectMembersRemoveController.php
··· 49 49 '-' => array($remove_phid => $remove_phid), 50 50 )); 51 51 52 - $editor = id(new PhabricatorProjectTransactionEditor($project)) 52 + $editor = id(new PhabricatorProjectTransactionEditor()) 53 53 ->setActor($viewer) 54 54 ->setContentSourceFromRequest($request) 55 55 ->setContinueOnNoEffect(true)
+1 -1
src/applications/project/controller/PhabricatorProjectSilenceController.php
··· 53 53 $edge_action => array($viewer_phid => $viewer_phid), 54 54 )); 55 55 56 - $editor = id(new PhabricatorProjectTransactionEditor($project)) 56 + $editor = id(new PhabricatorProjectTransactionEditor()) 57 57 ->setActor($viewer) 58 58 ->setContentSourceFromRequest($request) 59 59 ->setContinueOnNoEffect(true)
+1 -1
src/applications/project/controller/PhabricatorProjectUpdateController.php
··· 67 67 ->setMetadataValue('edge:type', $type_member) 68 68 ->setNewValue($member_spec); 69 69 70 - $editor = id(new PhabricatorProjectTransactionEditor($project)) 70 + $editor = id(new PhabricatorProjectTransactionEditor()) 71 71 ->setActor($viewer) 72 72 ->setContentSourceFromRequest($request) 73 73 ->setContinueOnNoEffect(true)
+1 -1
src/applications/project/controller/PhabricatorProjectWatchController.php
··· 64 64 ->setMetadataValue('edge:type', $type_watcher) 65 65 ->setNewValue($member_spec); 66 66 67 - $editor = id(new PhabricatorProjectTransactionEditor($project)) 67 + $editor = id(new PhabricatorProjectTransactionEditor()) 68 68 ->setActor($viewer) 69 69 ->setContentSourceFromRequest($request) 70 70 ->setContinueOnNoEffect(true)
+1 -3
src/applications/project/customfield/PhabricatorProjectConfiguredCustomField.php
··· 11 11 public function createFields($object) { 12 12 return PhabricatorStandardCustomField::buildStandardFields( 13 13 $this, 14 - PhabricatorEnv::getEnvConfig( 15 - 'projects.custom-field-definitions', 16 - array())); 14 + PhabricatorEnv::getEnvConfig('projects.custom-field-definitions')); 17 15 } 18 16 19 17 }
+1 -1
src/applications/project/icon/PhabricatorProjectIconSet.php
··· 269 269 'The project icon ("%s") with special attribute "%s" must '. 270 270 'not be disabled', 271 271 $key, 272 - self::SPECIAL_MIILESTONE)); 272 + self::SPECIAL_MILESTONE)); 273 273 } 274 274 $milestone = $value; 275 275 } else {
+2 -2
src/applications/releeph/query/ReleephRequestQuery.php
··· 229 229 ); 230 230 case self::STATUS_NEEDS_REVERT: 231 231 return array( 232 - ReleephRequestStatus::NEEDS_REVERT, 232 + ReleephRequestStatus::STATUS_NEEDS_REVERT, 233 233 ); 234 234 case self::STATUS_REVERTED: 235 235 return array( 236 - ReleephRequestStatus::REVERTED, 236 + ReleephRequestStatus::STATUS_REVERTED, 237 237 ); 238 238 default: 239 239 throw new Exception(pht("Unknown status '%s'!", $this->status));
-5
src/applications/repository/query/PhabricatorRepositoryURIQuery.php
··· 30 30 return $this; 31 31 } 32 32 33 - public function withObjectHashes(array $hashes) { 34 - $this->objectHashes = $hashes; 35 - return $this; 36 - } 37 - 38 33 public function newResultObject() { 39 34 return new PhabricatorRepositoryURI(); 40 35 }
+1 -1
src/applications/repository/storage/PhabricatorRepositoryURI.php
··· 577 577 self::IO_READWRITE => 200, 578 578 self::IO_READ => 100, 579 579 ); 580 - $score += idx($io_points, $this->getEffectiveIoType(), 0); 580 + $score += idx($io_points, $this->getEffectiveIOType(), 0); 581 581 582 582 $protocol_points = array( 583 583 self::BUILTIN_PROTOCOL_SSH => 30,
+2 -2
src/applications/search/engine/PhabricatorApplicationSearchEngine.php
··· 139 139 * Executes the saved query. 140 140 * 141 141 * @param PhabricatorSavedQuery The saved query to operate on. 142 - * @return The result of the query. 142 + * @return PhabricatorQuery The result of the query. 143 143 */ 144 144 public function buildQueryFromSavedQuery(PhabricatorSavedQuery $original) { 145 145 $saved = clone $original; ··· 469 469 470 470 public function loadAllNamedQueries() { 471 471 $viewer = $this->requireViewer(); 472 - $builtin = $this->getBuiltinQueries($viewer); 472 + $builtin = $this->getBuiltinQueries(); 473 473 474 474 if ($this->namedQueries === null) { 475 475 $named_queries = id(new PhabricatorNamedQueryQuery())
+2 -2
src/applications/search/engine/PhabricatorProfileMenuEngine.php
··· 218 218 $edit_mode = $request->getURIData('itemEditMode'); 219 219 } 220 220 221 - $available_modes = $this->getViewerEditModes($viewer); 221 + $available_modes = $this->getViewerEditModes(); 222 222 if ($available_modes) { 223 223 $available_modes = array_fuse($available_modes); 224 224 if (isset($available_modes[$edit_mode])) { ··· 731 731 private function buildMenuEditModeContent() { 732 732 $viewer = $this->getViewer(); 733 733 734 - $modes = $this->getViewerEditModes($viewer); 734 + $modes = $this->getViewerEditModes(); 735 735 if (!$modes) { 736 736 return new Aphront404Response(); 737 737 }
+2 -2
src/applications/search/storage/PhabricatorSavedQuery.php
··· 59 59 return $this; 60 60 } 61 61 62 - public function getEvaluatedParameter($key, $default = null) { 63 - return $this->assertAttachedKey($this->parameterMap, $key, $default); 62 + public function getEvaluatedParameter($key) { 63 + return $this->assertAttachedKey($this->parameterMap, $key); 64 64 } 65 65 66 66
+2 -2
src/applications/slowvote/controller/PhabricatorSlowvoteVoteController.php
··· 28 28 if ($request->isAjax()) { 29 29 $vote = $request->getInt('vote'); 30 30 $votes = array_keys($old_votes); 31 - $votes = array_fuse($votes, $votes); 31 + $votes = array_fuse($votes); 32 32 33 33 if ($poll->getMethod() == PhabricatorSlowvotePoll::METHOD_PLURALITY) { 34 34 if (idx($votes, $vote, false)) { ··· 68 68 } 69 69 70 70 $votes = $request->getArr('vote'); 71 - $votes = array_fuse($votes, $votes); 71 + $votes = array_fuse($votes); 72 72 73 73 $this->updateVotes($viewer, $poll, $old_votes, $votes); 74 74
+1 -1
src/applications/spaces/controller/PhabricatorSpacesListController.php
··· 9 9 10 10 public function handleRequest(AphrontRequest $request) { 11 11 $request = $this->getRequest(); 12 - $controller = id(new PhabricatorApplicationSearchController($request)) 12 + $controller = id(new PhabricatorApplicationSearchController()) 13 13 ->setQueryKey($request->getURIData('queryKey')) 14 14 ->setSearchEngine(new PhabricatorSpacesNamespaceSearchEngine()) 15 15 ->setNavigation($this->buildSideNavView());
+1
src/applications/tokens/storage/PhabricatorTokensToken.php
··· 14 14 protected $tokenImagePHID; 15 15 protected $builtinKey; 16 16 17 + private $tokenImageFile = self::ATTACHABLE; 17 18 18 19 const STATUS_ACTIVE = 'active'; 19 20 const STATUS_ARCHIVED = 'archived';
+1
src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php
··· 12 12 private $previewTimelineID; 13 13 private $previewToggleID; 14 14 private $formID; 15 + private $statusID; 15 16 private $commentID; 16 17 private $draft; 17 18 private $requestURI;
+1 -1
src/infrastructure/daemon/bot/adapter/PhabricatorStreamingProtocolAdapter.php
··· 6 6 protected $readHandles; 7 7 protected $multiHandle; 8 8 protected $authtoken; 9 + protected $inRooms = array(); 9 10 10 11 private $readBuffers; 11 12 private $server; 12 13 private $active; 13 - private $inRooms = array(); 14 14 15 15 public function getServiceName() { 16 16 $uri = new PhutilURI($this->server);
+2 -2
src/infrastructure/storage/lisk/LiskDAO.php
··· 242 242 * Get an existing, cached connection for this object. 243 243 * 244 244 * @param mode Connection mode. 245 - * @return AprontDatabaseConnection|null Connection, if it exists in cache. 245 + * @return AphrontDatabaseConnection|null Connection, if it exists in cache. 246 246 * @task conn 247 247 */ 248 248 protected function getEstablishedConnection($mode) { ··· 953 953 * @param string 'r' for read, 'w' for read/write. 954 954 * @param bool True to force a new connection. The connection will not 955 955 * be retrieved from or saved into the connection cache. 956 - * @return LiskDatabaseConnection Lisk connection object. 956 + * @return AphrontDatabaseConnection Lisk connection object. 957 957 * 958 958 * @task info 959 959 */
+2 -2
src/infrastructure/util/password/PhabricatorPasswordHasher.php
··· 260 260 /** 261 261 * Get the best (strongest) available hasher. 262 262 * 263 - * @return PhabicatorPasswordHasher Best hasher. 263 + * @return PhabricatorPasswordHasher Best hasher. 264 264 * @task hashing 265 265 */ 266 266 public static function getBestHasher() { ··· 282 282 /** 283 283 * Get the hashser for a given stored hash. 284 284 * 285 - * @return PhabicatorPasswordHasher Corresponding hasher. 285 + * @return PhabricatorPasswordHasher Corresponding hasher. 286 286 * @task hashing 287 287 */ 288 288 public static function getHasherForHash(PhutilOpaqueEnvelope $hash) {
+1 -1
src/view/form/control/AphrontFormTextAreaControl.php
··· 85 85 array( 86 86 'name' => $this->getName(), 87 87 'disabled' => $this->getDisabled() ? 'disabled' : null, 88 - 'readonly' => $this->getReadonly() ? 'readonly' : null, 88 + 'readonly' => $this->getReadOnly() ? 'readonly' : null, 89 89 'class' => $classes, 90 90 'style' => $this->getControlStyle(), 91 91 'id' => $this->getID(),
+1 -1
src/view/layout/AphrontSideNavFilterView.php
··· 105 105 $key, $name, $uri, PHUIListItemView::TYPE_BUTTON); 106 106 } 107 107 108 - private function addThing($key, $name, $uri, $type, $icon) { 108 + private function addThing($key, $name, $uri, $type, $icon = null) { 109 109 $item = id(new PHUIListItemView()) 110 110 ->setName($name) 111 111 ->setType($type);
+1 -1
src/view/phui/PHUITimelineView.php
··· 182 182 } 183 183 184 184 if ($this->shouldTerminate) { 185 - $events[] = self::renderEnder(true); 185 + $events[] = self::renderEnder(); 186 186 } 187 187 188 188 return $events;
-34
src/view/phui/calendar/PHUICalendarDayView.php
··· 369 369 370 370 return $date; 371 371 } 372 - 373 - private function findTodayClusters() { 374 - $events = msort($this->todayEvents, 'getEpochStart'); 375 - $clusters = array(); 376 - 377 - foreach ($events as $event) { 378 - $destination_cluster_key = null; 379 - $event_start = $event->getEpochStart() - (30 * 60); 380 - $event_end = $event->getEpochEnd() + (30 * 60); 381 - 382 - foreach ($clusters as $key => $cluster) { 383 - foreach ($cluster as $clustered_event) { 384 - $compare_event_start = $clustered_event->getEpochStart(); 385 - $compare_event_end = $clustered_event->getEpochEnd(); 386 - 387 - if ($event_start < $compare_event_end 388 - && $event_end > $compare_event_start) { 389 - $destination_cluster_key = $key; 390 - break; 391 - } 392 - } 393 - } 394 - 395 - if ($destination_cluster_key !== null) { 396 - $clusters[$destination_cluster_key][] = $event; 397 - } else { 398 - $next_cluster = array(); 399 - $next_cluster[] = $event; 400 - $clusters[] = $next_cluster; 401 - } 402 - } 403 - 404 - return $clusters; 405 - } 406 372 }
+1 -2
src/view/phui/calendar/PHUICalendarListView.php
··· 57 57 Javelin::initBehavior('phabricator-tooltips'); 58 58 59 59 $singletons = array(); 60 - $allday = false; 61 60 foreach ($this->events as $event) { 62 61 $start_epoch = $event->getEpochStart(); 63 62 ··· 81 80 array( 82 81 'class' => 'phui-calendar-list-title', 83 82 ), 84 - $this->getEventTitle($event, $allday)); 83 + $this->getEventTitle($event)); 85 84 $time = phutil_tag( 86 85 'span', 87 86 array(