@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

Various linter fixes

Summary: Apply various linter fixes.

Test Plan: Unit tests + eyeballing.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: hach-que, Korvin, epriestley

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

+123 -142
+41 -41
src/aphront/AphrontRequest.php
··· 28 28 private $applicationConfiguration; 29 29 private $uriData; 30 30 31 - final public function __construct($host, $path) { 31 + public function __construct($host, $path) { 32 32 $this->host = $host; 33 33 $this->path = $path; 34 34 } 35 35 36 - final public function setURIMap(array $uri_data) { 36 + public function setURIMap(array $uri_data) { 37 37 $this->uriData = $uri_data; 38 38 return $this; 39 39 } 40 40 41 - final public function getURIMap() { 41 + public function getURIMap() { 42 42 return $this->uriData; 43 43 } 44 44 45 - final public function getURIData($key, $default = null) { 45 + public function getURIData($key, $default = null) { 46 46 return idx($this->uriData, $key, $default); 47 47 } 48 48 49 - final public function setApplicationConfiguration( 49 + public function setApplicationConfiguration( 50 50 $application_configuration) { 51 51 $this->applicationConfiguration = $application_configuration; 52 52 return $this; 53 53 } 54 54 55 - final public function getApplicationConfiguration() { 55 + public function getApplicationConfiguration() { 56 56 return $this->applicationConfiguration; 57 57 } 58 58 59 - final public function setPath($path) { 59 + public function setPath($path) { 60 60 $this->path = $path; 61 61 return $this; 62 62 } 63 63 64 - final public function getPath() { 64 + public function getPath() { 65 65 return $this->path; 66 66 } 67 67 68 - final public function getHost() { 68 + public function getHost() { 69 69 // The "Host" header may include a port number, or may be a malicious 70 70 // header in the form "realdomain.com:ignored@evil.com". Invoke the full 71 71 // parser to extract the real domain correctly. See here for coverage of ··· 83 83 /** 84 84 * @task data 85 85 */ 86 - final public function setRequestData(array $request_data) { 86 + public function setRequestData(array $request_data) { 87 87 $this->requestData = $request_data; 88 88 return $this; 89 89 } ··· 92 92 /** 93 93 * @task data 94 94 */ 95 - final public function getRequestData() { 95 + public function getRequestData() { 96 96 return $this->requestData; 97 97 } 98 98 ··· 100 100 /** 101 101 * @task data 102 102 */ 103 - final public function getInt($name, $default = null) { 103 + public function getInt($name, $default = null) { 104 104 if (isset($this->requestData[$name])) { 105 105 return (int)$this->requestData[$name]; 106 106 } else { ··· 112 112 /** 113 113 * @task data 114 114 */ 115 - final public function getBool($name, $default = null) { 115 + public function getBool($name, $default = null) { 116 116 if (isset($this->requestData[$name])) { 117 117 if ($this->requestData[$name] === 'true') { 118 118 return true; ··· 130 130 /** 131 131 * @task data 132 132 */ 133 - final public function getStr($name, $default = null) { 133 + public function getStr($name, $default = null) { 134 134 if (isset($this->requestData[$name])) { 135 135 $str = (string)$this->requestData[$name]; 136 136 // Normalize newline craziness. ··· 148 148 /** 149 149 * @task data 150 150 */ 151 - final public function getArr($name, $default = array()) { 151 + public function getArr($name, $default = array()) { 152 152 if (isset($this->requestData[$name]) && 153 153 is_array($this->requestData[$name])) { 154 154 return $this->requestData[$name]; ··· 161 161 /** 162 162 * @task data 163 163 */ 164 - final public function getStrList($name, $default = array()) { 164 + public function getStrList($name, $default = array()) { 165 165 if (!isset($this->requestData[$name])) { 166 166 return $default; 167 167 } ··· 174 174 /** 175 175 * @task data 176 176 */ 177 - final public function getExists($name) { 177 + public function getExists($name) { 178 178 return array_key_exists($name, $this->requestData); 179 179 } 180 180 181 - final public function getFileExists($name) { 181 + public function getFileExists($name) { 182 182 return isset($_FILES[$name]) && 183 183 (idx($_FILES[$name], 'error') !== UPLOAD_ERR_NO_FILE); 184 184 } 185 185 186 - final public function isHTTPGet() { 186 + public function isHTTPGet() { 187 187 return ($_SERVER['REQUEST_METHOD'] == 'GET'); 188 188 } 189 189 190 - final public function isHTTPPost() { 190 + public function isHTTPPost() { 191 191 return ($_SERVER['REQUEST_METHOD'] == 'POST'); 192 192 } 193 193 194 - final public function isAjax() { 194 + public function isAjax() { 195 195 return $this->getExists(self::TYPE_AJAX) && !$this->isQuicksand(); 196 196 } 197 197 198 - final public function isWorkflow() { 198 + public function isWorkflow() { 199 199 return $this->getExists(self::TYPE_WORKFLOW) && !$this->isQuicksand(); 200 200 } 201 201 202 - final public function isQuicksand() { 202 + public function isQuicksand() { 203 203 return $this->getExists(self::TYPE_QUICKSAND); 204 204 } 205 205 206 - final public function isConduit() { 206 + public function isConduit() { 207 207 return $this->getExists(self::TYPE_CONDUIT); 208 208 } 209 209 ··· 215 215 return 'X-Phabricator-Csrf'; 216 216 } 217 217 218 - final public function validateCSRF() { 218 + public function validateCSRF() { 219 219 $token_name = self::getCSRFTokenName(); 220 220 $token = $this->getStr($token_name); 221 221 ··· 281 281 return true; 282 282 } 283 283 284 - final public function isFormPost() { 284 + public function isFormPost() { 285 285 $post = $this->getExists(self::TYPE_FORM) && 286 286 !$this->getExists(self::TYPE_HISEC) && 287 287 $this->isHTTPPost(); ··· 293 293 return $this->validateCSRF(); 294 294 } 295 295 296 - final public function isFormOrHisecPost() { 296 + public function isFormOrHisecPost() { 297 297 $post = $this->getExists(self::TYPE_FORM) && 298 298 $this->isHTTPPost(); 299 299 ··· 305 305 } 306 306 307 307 308 - final public function setCookiePrefix($prefix) { 308 + public function setCookiePrefix($prefix) { 309 309 $this->cookiePrefix = $prefix; 310 310 return $this; 311 311 } 312 312 313 - final private function getPrefixedCookieName($name) { 313 + private function getPrefixedCookieName($name) { 314 314 if (strlen($this->cookiePrefix)) { 315 315 return $this->cookiePrefix.'_'.$name; 316 316 } else { ··· 318 318 } 319 319 } 320 320 321 - final public function getCookie($name, $default = null) { 321 + public function getCookie($name, $default = null) { 322 322 $name = $this->getPrefixedCookieName($name); 323 323 $value = idx($_COOKIE, $name, $default); 324 324 ··· 337 337 return $value; 338 338 } 339 339 340 - final public function clearCookie($name) { 340 + public function clearCookie($name) { 341 341 $this->setCookieWithExpiration($name, '', time() - (60 * 60 * 24 * 30)); 342 342 unset($_COOKIE[$name]); 343 343 } ··· 390 390 * 391 391 * @task cookie 392 392 */ 393 - final public function canSetCookies() { 393 + public function canSetCookies() { 394 394 return (bool)$this->getCookieDomainURI(); 395 395 } 396 396 ··· 405 405 * @return this 406 406 * @task cookie 407 407 */ 408 - final public function setCookie($name, $value) { 408 + public function setCookie($name, $value) { 409 409 $far_future = time() + (60 * 60 * 24 * 365 * 5); 410 410 return $this->setCookieWithExpiration($name, $value, $far_future); 411 411 } ··· 421 421 * @return this 422 422 * @task cookie 423 423 */ 424 - final public function setTemporaryCookie($name, $value) { 424 + public function setTemporaryCookie($name, $value) { 425 425 return $this->setCookieWithExpiration($name, $value, 0); 426 426 } 427 427 ··· 435 435 * @return this 436 436 * @task cookie 437 437 */ 438 - final private function setCookieWithExpiration( 438 + private function setCookieWithExpiration( 439 439 $name, 440 440 $value, 441 441 $expire) { ··· 485 485 return $this; 486 486 } 487 487 488 - final public function setUser($user) { 488 + public function setUser($user) { 489 489 $this->user = $user; 490 490 return $this; 491 491 } 492 492 493 - final public function getUser() { 493 + public function getUser() { 494 494 return $this->user; 495 495 } 496 496 497 - final public function getViewer() { 497 + public function getViewer() { 498 498 return $this->user; 499 499 } 500 500 501 - final public function getRequestURI() { 501 + public function getRequestURI() { 502 502 $get = $_GET; 503 503 unset($get['__path__']); 504 504 $path = phutil_escape_uri($this->getPath()); 505 505 return id(new PhutilURI($path))->setQueryParams($get); 506 506 } 507 507 508 - final public function isDialogFormPost() { 508 + public function isDialogFormPost() { 509 509 return $this->isFormPost() && $this->getStr('__dialog__'); 510 510 } 511 511 512 - final public function getRemoteAddr() { 512 + public function getRemoteAddr() { 513 513 return $_SERVER['REMOTE_ADDR']; 514 514 } 515 515
+3 -3
src/aphront/AphrontURIMapper.php
··· 4 4 5 5 private $map; 6 6 7 - final public function __construct(array $map) { 7 + public function __construct(array $map) { 8 8 $this->map = $map; 9 9 } 10 10 11 - final public function mapPath($path) { 11 + public function mapPath($path) { 12 12 $map = $this->map; 13 13 foreach ($map as $rule => $value) { 14 14 list($controller, $data) = $this->tryRule($rule, $value, $path); ··· 25 25 return array(null, null); 26 26 } 27 27 28 - final private function tryRule($rule, $value, $path) { 28 + private function tryRule($rule, $value, $path) { 29 29 $match = null; 30 30 $pattern = '#^'.$rule.(is_array($value) ? '' : '$').'#'; 31 31 if (!preg_match($pattern, $path, $match)) {
+1 -1
src/aphront/response/AphrontJSONResponse.php
··· 19 19 if ($this->addJSONShield === null) { 20 20 return true; 21 21 } 22 - return (bool) $this->addJSONShield; 22 + return (bool)$this->addJSONShield; 23 23 } 24 24 25 25 public function buildResponseString() {
+1 -1
src/applications/celerity/CelerityResourceGraph.php
··· 18 18 return $edges; 19 19 } 20 20 21 - final public function setResourceGraph(array $graph) { 21 + public function setResourceGraph(array $graph) { 22 22 $this->resourceGraph = $graph; 23 23 $this->graphSet = true; 24 24 return $this;
+1 -1
src/applications/conpherence/controller/ConpherenceUpdateController.php
··· 550 550 $content = array( 551 551 'non_update' => $non_update, 552 552 'transactions' => hsprintf('%s', $rendered_transactions), 553 - 'conpherence_title' => (string) $data['title'], 553 + 'conpherence_title' => (string)$data['title'], 554 554 'latest_transaction_id' => $new_latest_transaction_id, 555 555 'nav_item' => $nav_item, 556 556 'conpherence_phid' => $conpherence->getPHID(),
+2 -2
src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php
··· 246 246 $action_edit = id(new PHUIIconView()) 247 247 ->setIconFont('fa-pencil') 248 248 ->setWorkflow(true) 249 - ->setHref((string) $edit_uri); 249 + ->setHref((string)$edit_uri); 250 250 $header->addAction($action_edit); 251 251 252 252 if ($dashboard_id) { ··· 255 255 ->setQueryParam('panelPHID', $panel->getPHID()); 256 256 $action_remove = id(new PHUIIconView()) 257 257 ->setIconFont('fa-trash-o') 258 - ->setHref((string) $uri) 258 + ->setHref((string)$uri) 259 259 ->setWorkflow(true); 260 260 $header->addAction($action_remove); 261 261 }
+15 -15
src/applications/diffusion/data/DiffusionPathChange.php
··· 13 13 private $targetCommitIdentifier; 14 14 private $awayPaths = array(); 15 15 16 - final public function setPath($path) { 16 + public function setPath($path) { 17 17 $this->path = $path; 18 18 return $this; 19 19 } 20 20 21 - final public function getPath() { 21 + public function getPath() { 22 22 return $this->path; 23 23 } 24 24 ··· 58 58 return $this->awayPaths; 59 59 } 60 60 61 - final public function setCommitIdentifier($commit) { 61 + public function setCommitIdentifier($commit) { 62 62 $this->commitIdentifier = $commit; 63 63 return $this; 64 64 } 65 65 66 - final public function getCommitIdentifier() { 66 + public function getCommitIdentifier() { 67 67 return $this->commitIdentifier; 68 68 } 69 69 70 - final public function setTargetCommitIdentifier($target_commit_identifier) { 70 + public function setTargetCommitIdentifier($target_commit_identifier) { 71 71 $this->targetCommitIdentifier = $target_commit_identifier; 72 72 return $this; 73 73 } 74 74 75 - final public function getTargetCommitIdentifier() { 75 + public function getTargetCommitIdentifier() { 76 76 return $this->targetCommitIdentifier; 77 77 } 78 78 79 - final public function setCommit($commit) { 79 + public function setCommit($commit) { 80 80 $this->commit = $commit; 81 81 return $this; 82 82 } 83 83 84 - final public function getCommit() { 84 + public function getCommit() { 85 85 return $this->commit; 86 86 } 87 87 88 - final public function setCommitData($commit_data) { 88 + public function setCommitData($commit_data) { 89 89 $this->commitData = $commit_data; 90 90 return $this; 91 91 } 92 92 93 - final public function getCommitData() { 93 + public function getCommitData() { 94 94 return $this->commitData; 95 95 } 96 96 97 97 98 - final public function getEpoch() { 98 + public function getEpoch() { 99 99 if ($this->getCommit()) { 100 100 return $this->getCommit()->getEpoch(); 101 101 } 102 102 return null; 103 103 } 104 104 105 - final public function getAuthorName() { 105 + public function getAuthorName() { 106 106 if ($this->getCommitData()) { 107 107 return $this->getCommitData()->getAuthorName(); 108 108 } 109 109 return null; 110 110 } 111 111 112 - final public function getSummary() { 112 + public function getSummary() { 113 113 if (!$this->getCommitData()) { 114 114 return null; 115 115 } ··· 118 118 return substr($first, 0, 80); 119 119 } 120 120 121 - final public static function convertToArcanistChanges(array $changes) { 121 + public static function convertToArcanistChanges(array $changes) { 122 122 assert_instances_of($changes, __CLASS__); 123 123 $direct = array(); 124 124 $result = array(); ··· 142 142 return array_select_keys($result, $direct); 143 143 } 144 144 145 - final public static function convertToDifferentialChangesets( 145 + public static function convertToDifferentialChangesets( 146 146 PhabricatorUser $user, 147 147 array $changes) { 148 148 assert_instances_of($changes, __CLASS__);
+1 -1
src/applications/diffusion/query/DiffusionRenameHistoryQuery.php
··· 30 30 return $this->oldCommit; 31 31 } 32 32 33 - final public function loadOldFilename() { 33 + public function loadOldFilename() { 34 34 $drequest = $this->request; 35 35 $repository_id = $drequest->getRepository()->getID(); 36 36 $conn_r = id(new PhabricatorRepository())->establishConnection('r');
+4 -4
src/applications/diffusion/query/pathchange/DiffusionPathChangeQuery.php
··· 14 14 return $this->limit; 15 15 } 16 16 17 - final private function __construct() { 17 + private function __construct() { 18 18 // <private> 19 19 } 20 20 21 - final public static function newFromDiffusionRequest( 21 + public static function newFromDiffusionRequest( 22 22 DiffusionRequest $request) { 23 23 $query = new DiffusionPathChangeQuery(); 24 24 $query->request = $request; ··· 26 26 return $query; 27 27 } 28 28 29 - final protected function getRequest() { 29 + protected function getRequest() { 30 30 return $this->request; 31 31 } 32 32 33 - final public function loadChanges() { 33 + public function loadChanges() { 34 34 return $this->executeQuery(); 35 35 } 36 36
+1 -1
src/applications/files/storage/PhabricatorFile.php
··· 758 758 public function getDownloadURI() { 759 759 $uri = id(new PhutilURI($this->getViewURI())) 760 760 ->setQueryParam('download', true); 761 - return (string) $uri; 761 + return (string)$uri; 762 762 } 763 763 764 764 public function getURIForTransform(PhabricatorFileTransform $transform) {
+3 -3
src/applications/herald/adapter/HeraldAdapter.php
··· 166 166 throw new Exception(pht('You must setIsNewObject to a boolean first!')); 167 167 } 168 168 public function setIsNewObject($new) { 169 - $this->isNewObject = (bool) $new; 169 + $this->isNewObject = (bool)$new; 170 170 return $this; 171 171 } 172 172 ··· 681 681 } 682 682 return $result; 683 683 case self::CONDITION_HAS_BIT: 684 - return (($condition_value & $field_value) === (int) $condition_value); 684 + return (($condition_value & $field_value) === (int)$condition_value); 685 685 case self::CONDITION_NOT_BIT: 686 - return (($condition_value & $field_value) !== (int) $condition_value); 686 + return (($condition_value & $field_value) !== (int)$condition_value); 687 687 default: 688 688 throw new HeraldInvalidConditionException( 689 689 "Unknown condition '{$condition_type}'.");
+1 -1
src/applications/legalpad/controller/LegalpadDocumentSignController.php
··· 199 199 $next_uri = '/'.$document->getMonogram(); 200 200 if ($document->getRequireSignature()) { 201 201 $request_uri = $request->getRequestURI(); 202 - $next_uri = (string) $request_uri; 202 + $next_uri = (string)$request_uri; 203 203 } 204 204 } else { 205 205 $this->sendVerifySignatureEmail(
+1 -1
src/applications/metamta/storage/PhabricatorMetaMTAReceivedMail.php
··· 90 90 return $this->loadPHIDsFromAddresses($addresses); 91 91 } 92 92 93 - final public function loadCCPHIDs() { 93 + public function loadCCPHIDs() { 94 94 return $this->loadPHIDsFromAddresses($this->getCCAddresses()); 95 95 } 96 96
+1 -1
src/applications/notification/controller/PhabricatorNotificationPanelController.php
··· 34 34 'a', 35 35 array( 36 36 'sigil' => 'workflow', 37 - 'href' => (string) $clear_uri, 37 + 'href' => (string)$clear_uri, 38 38 'class' => $clear_ui_class, 39 39 ), 40 40 pht('Mark All Read'));
+1 -1
src/applications/oauthserver/PhabricatorOAuthServer.php
··· 112 112 $authorization_code->setClientPHID($client->getPHID()); 113 113 $authorization_code->setClientSecret($client->getSecret()); 114 114 $authorization_code->setUserPHID($this->getUser()->getPHID()); 115 - $authorization_code->setRedirectURI((string) $redirect_uri); 115 + $authorization_code->setRedirectURI((string)$redirect_uri); 116 116 $authorization_code->save(); 117 117 118 118 return $authorization_code;
+1 -1
src/applications/owners/controller/PhabricatorOwnersDetailController.php
··· 92 92 $path_link = phutil_tag( 93 93 'a', 94 94 array( 95 - 'href' => (string) $href, 95 + 'href' => (string)$href, 96 96 ), 97 97 $path->getPath()); 98 98 $path_links[] = hsprintf(
+1 -1
src/applications/owners/controller/PhabricatorOwnersListController.php
··· 285 285 phutil_tag( 286 286 'a', 287 287 array( 288 - 'href' => (string) $href, 288 + 'href' => (string)$href, 289 289 ), 290 290 $path->getPath())); 291 291 } else {
-4
src/applications/people/controller/PhabricatorPeopleController.php
··· 45 45 return $this->buildSideNavView(true)->getMenu(); 46 46 } 47 47 48 - protected function buildApplicationCrumbs() { 49 - return parent::buildApplicationCrumbs(); 50 - } 51 - 52 48 public function buildIconNavView(PhabricatorUser $user) { 53 49 $viewer = $this->getViewer(); 54 50 $picture = $user->getProfileImageURI();
+3 -3
src/applications/pholio/editor/PholioMockEditor.php
··· 260 260 break; 261 261 case PholioTransactionType::TYPE_IMAGE_NAME: 262 262 $image = $this->getImageForXaction($object, $xaction); 263 - $value = (string) head($xaction->getNewValue()); 263 + $value = (string)head($xaction->getNewValue()); 264 264 $image->setName($value); 265 265 $image->save(); 266 266 break; 267 267 case PholioTransactionType::TYPE_IMAGE_DESCRIPTION: 268 268 $image = $this->getImageForXaction($object, $xaction); 269 - $value = (string) head($xaction->getNewValue()); 269 + $value = (string)head($xaction->getNewValue()); 270 270 $image->setDescription($value); 271 271 $image->save(); 272 272 break; 273 273 case PholioTransactionType::TYPE_IMAGE_SEQUENCE: 274 274 $image = $this->getImageForXaction($object, $xaction); 275 - $value = (int) head($xaction->getNewValue()); 275 + $value = (int)head($xaction->getNewValue()); 276 276 $image->setSequence($value); 277 277 $image->save(); 278 278 break;
+2 -2
src/applications/pholio/view/PholioMockImagesView.php
··· 137 137 ); 138 138 139 139 $login_uri = id(new PhutilURI('/login/')) 140 - ->setQueryParam('next', (string) $this->getRequestURI()); 140 + ->setQueryParam('next', (string)$this->getRequestURI()); 141 141 142 142 $config = array( 143 143 'mockID' => $mock->getID(), ··· 147 147 'images' => $images, 148 148 'selectedID' => $selected_id, 149 149 'loggedIn' => $this->getUser()->isLoggedIn(), 150 - 'logInLink' => (string) $login_uri, 150 + 'logInLink' => (string)$login_uri, 151 151 'navsequence' => $navsequence, 152 152 'fullIcon' => hsprintf('%s', $full_icon), 153 153 'downloadIcon' => hsprintf('%s', $download_icon),
+1 -1
src/applications/project/editor/PhabricatorProjectTransactionEditor.php
··· 51 51 case PhabricatorProjectTransaction::TYPE_COLOR: 52 52 return $object->getColor(); 53 53 case PhabricatorProjectTransaction::TYPE_LOCKED: 54 - return (int) $object->getIsMembershipLocked(); 54 + return (int)$object->getIsMembershipLocked(); 55 55 } 56 56 57 57 return parent::getCustomTransactionOldValue($object, $xaction);
+1 -1
src/applications/releeph/conduit/work/ReleephWorkNextRequestConduitAPIMethod.php
··· 177 177 foreach ($releeph_requests as $rq) { 178 178 // TODO: it's likely that relying on the `id` column to provide 179 179 // trunk-commit-order is thoroughly broken. 180 - $ordinal = (int) $rq->loadPhabricatorRepositoryCommit()->getID(); 180 + $ordinal = (int)$rq->loadPhabricatorRepositoryCommit()->getID(); 181 181 $surrogate[$ordinal] = $rq; 182 182 } 183 183 ksort($surrogate);
+1 -1
src/applications/releeph/differential/DifferentialReleephRequestFieldSpecification.php
··· 180 180 "Releeph request token '{$token}'!"); 181 181 } 182 182 183 - $id = (int) $match[1]; 183 + $id = (int)$match[1]; 184 184 $releeph_request = id(new ReleephRequest())->load($id); 185 185 186 186 if (!$releeph_request) {
+1 -1
src/applications/releeph/editor/ReleephRequestTransactionalEditor.php
··· 114 114 break; 115 115 116 116 case ReleephRequestTransaction::TYPE_MANUAL_IN_BRANCH: 117 - $object->setInBranch((int) $new); 117 + $object->setInBranch((int)$new); 118 118 break; 119 119 } 120 120 }
-7
src/applications/releeph/storage/ReleephRequest.php
··· 293 293 throw new Exception('`status` is now deprecated!'); 294 294 } 295 295 296 - /* -( Make magic Lisk methods private )------------------------------------ */ 297 - 298 - private function setUserIntents(array $ar) { 299 - return parent::setUserIntents($ar); 300 - } 301 - 302 - 303 296 /* -( PhabricatorApplicationTransactionInterface )------------------------- */ 304 297 305 298
-4
src/applications/releeph/storage/ReleephRequestTransaction.php
··· 146 146 } 147 147 } 148 148 149 - public function getActionStrength() { 150 - return parent::getActionStrength(); 151 - } 152 - 153 149 public function getActionName() { 154 150 switch ($this->getTransactionType()) { 155 151 case self::TYPE_REQUEST:
+1 -1
src/applications/tokens/query/PhabricatorTokenCountQuery.php
··· 10 10 return $this; 11 11 } 12 12 13 - final public function execute() { 13 + public function execute() { 14 14 $table = new PhabricatorTokenCount(); 15 15 $conn_r = $table->establishConnection('r'); 16 16
+1 -1
src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php
··· 83 83 $user = $this->getUser(); 84 84 if (!$user->isLoggedIn()) { 85 85 $uri = id(new PhutilURI('/login/')) 86 - ->setQueryParam('next', (string) $this->getRequestURI()); 86 + ->setQueryParam('next', (string)$this->getRequestURI()); 87 87 return id(new PHUIObjectBoxView()) 88 88 ->setFlush(true) 89 89 ->setHeaderText(pht('Add Comment'))
-4
src/infrastructure/events/PhabricatorEvent.php
··· 6 6 private $aphrontRequest; 7 7 private $conduitRequest; 8 8 9 - public function __construct($type, array $data = array()) { 10 - parent::__construct($type, $data); 11 - } 12 - 13 9 public function setUser(PhabricatorUser $user) { 14 10 $this->user = $user; 15 11 return $this;
+1 -1
src/infrastructure/storage/configuration/DefaultDatabaseConfigurationProvider.php
··· 40 40 return $this->namespace.'_'.$this->getDao()->getApplicationName(); 41 41 } 42 42 43 - final protected function getDao() { 43 + protected function getDao() { 44 44 return $this->dao; 45 45 } 46 46
+1 -1
src/infrastructure/storage/lisk/LiskDAOSet.php
··· 38 38 * The main purpose of this method is to break cyclic dependency. 39 39 * It removes all objects from this set and all subsets created by it. 40 40 */ 41 - final public function clearSet() { 41 + public function clearSet() { 42 42 $this->daos = array(); 43 43 $this->relatives = array(); 44 44 foreach ($this->subsets as $set) {
+1 -1
src/view/AphrontDialogView.php
··· 174 174 return $this; 175 175 } 176 176 177 - final public function render() { 177 + public function render() { 178 178 require_celerity_resource('aphront-dialog-view-css'); 179 179 180 180 $buttons = array();
+3 -3
src/view/AphrontJavelinView.php
··· 46 46 return $this->name; 47 47 } 48 48 49 - final public function setName($template_name) { 49 + public function setName($template_name) { 50 50 $this->name = $template_name; 51 51 return $this; 52 52 } ··· 55 55 return $this->parameters; 56 56 } 57 57 58 - final public function setParameters($template_parameters) { 58 + public function setParameters($template_parameters) { 59 59 $this->parameters = $template_parameters; 60 60 return $this; 61 61 } ··· 64 64 return $this->celerityResource; 65 65 } 66 66 67 - final public function setCelerityResource($celerity_resource) { 67 + public function setCelerityResource($celerity_resource) { 68 68 $this->celerityResource = $celerity_resource; 69 69 return $this; 70 70 }
+14 -14
src/view/control/AphrontCursorPagerView.php
··· 13 13 14 14 private $uri; 15 15 16 - final public function setPageSize($page_size) { 16 + public function setPageSize($page_size) { 17 17 $this->pageSize = max(1, $page_size); 18 18 return $this; 19 19 } 20 20 21 - final public function getPageSize() { 21 + public function getPageSize() { 22 22 return $this->pageSize; 23 23 } 24 24 25 - final public function setURI(PhutilURI $uri) { 25 + public function setURI(PhutilURI $uri) { 26 26 $this->uri = $uri; 27 27 return $this; 28 28 } 29 29 30 - final public function readFromRequest(AphrontRequest $request) { 30 + public function readFromRequest(AphrontRequest $request) { 31 31 $this->uri = $request->getRequestURI(); 32 32 $this->afterID = $request->getStr('after'); 33 33 $this->beforeID = $request->getStr('before'); 34 34 return $this; 35 35 } 36 36 37 - final public function setAfterID($after_id) { 37 + public function setAfterID($after_id) { 38 38 $this->afterID = $after_id; 39 39 return $this; 40 40 } 41 41 42 - final public function getAfterID() { 42 + public function getAfterID() { 43 43 return $this->afterID; 44 44 } 45 45 46 - final public function setBeforeID($before_id) { 46 + public function setBeforeID($before_id) { 47 47 $this->beforeID = $before_id; 48 48 return $this; 49 49 } 50 50 51 - final public function getBeforeID() { 51 + public function getBeforeID() { 52 52 return $this->beforeID; 53 53 } 54 54 55 - final public function setNextPageID($next_page_id) { 55 + public function setNextPageID($next_page_id) { 56 56 $this->nextPageID = $next_page_id; 57 57 return $this; 58 58 } 59 59 60 - final public function getNextPageID() { 60 + public function getNextPageID() { 61 61 return $this->nextPageID; 62 62 } 63 63 64 - final public function setPrevPageID($prev_page_id) { 64 + public function setPrevPageID($prev_page_id) { 65 65 $this->prevPageID = $prev_page_id; 66 66 return $this; 67 67 } 68 68 69 - final public function getPrevPageID() { 69 + public function getPrevPageID() { 70 70 return $this->prevPageID; 71 71 } 72 72 73 - final public function sliceResults(array $results) { 73 + public function sliceResults(array $results) { 74 74 if (count($results) > $this->getPageSize()) { 75 75 $offset = ($this->beforeID ? count($results) - $this->getPageSize() : 0); 76 76 $results = array_slice($results, $offset, $this->getPageSize(), true); ··· 79 79 return $results; 80 80 } 81 81 82 - final public function getHasMoreResults() { 82 + public function getHasMoreResults() { 83 83 return $this->moreResults; 84 84 } 85 85
+10 -10
src/view/control/AphrontPagerView.php
··· 13 13 private $surroundingPages = 2; 14 14 private $enableKeyboardShortcuts; 15 15 16 - final public function setPageSize($page_size) { 16 + public function setPageSize($page_size) { 17 17 $this->pageSize = max(1, $page_size); 18 18 return $this; 19 19 } 20 20 21 - final public function setOffset($offset) { 21 + public function setOffset($offset) { 22 22 $this->offset = max(0, $offset); 23 23 return $this; 24 24 } 25 25 26 - final public function getOffset() { 26 + public function getOffset() { 27 27 return $this->offset; 28 28 } 29 29 30 - final public function getPageSize() { 30 + public function getPageSize() { 31 31 return $this->pageSize; 32 32 } 33 33 34 - final public function setCount($count) { 34 + public function setCount($count) { 35 35 $this->count = $count; 36 36 return $this; 37 37 } 38 38 39 - final public function setHasMorePages($has_more) { 39 + public function setHasMorePages($has_more) { 40 40 $this->hasMorePages = $has_more; 41 41 return $this; 42 42 } 43 43 44 - final public function setURI(PhutilURI $uri, $paging_parameter) { 44 + public function setURI(PhutilURI $uri, $paging_parameter) { 45 45 $this->uri = $uri; 46 46 $this->pagingParameter = $paging_parameter; 47 47 return $this; 48 48 } 49 49 50 - final public function readFromRequest(AphrontRequest $request) { 50 + public function readFromRequest(AphrontRequest $request) { 51 51 $this->uri = $request->getRequestURI(); 52 52 $this->pagingParameter = 'offset'; 53 53 $this->offset = $request->getInt($this->pagingParameter); 54 54 return $this; 55 55 } 56 56 57 - final public function willShowPagingControls() { 57 + public function willShowPagingControls() { 58 58 return $this->hasMorePages; 59 59 } 60 60 61 - final public function setSurroundingPages($pages) { 61 + public function setSurroundingPages($pages) { 62 62 $this->surroundingPages = max(0, $pages); 63 63 return $this; 64 64 }
+1 -1
src/view/form/PHUIInfoView.php
··· 40 40 return $this; 41 41 } 42 42 43 - final public function render() { 43 + public function render() { 44 44 require_celerity_resource('phui-info-view-css'); 45 45 46 46 $errors = $this->errors;
+1 -1
src/view/layout/PhabricatorSourceCodeView.php
··· 72 72 73 73 if ($this->canClickHighlight) { 74 74 $line_uri = $this->uri.'$'.$line_number; 75 - $line_href = (string) new PhutilURI($line_uri); 75 + $line_href = (string)new PhutilURI($line_uri); 76 76 77 77 $tag_number = javelin_tag( 78 78 'a',
+1 -1
src/view/phui/PHUITimelineView.php
··· 132 132 javelin_tag( 133 133 'a', 134 134 array( 135 - 'href' => (string) $uri, 135 + 'href' => (string)$uri, 136 136 'mustcapture' => true, 137 137 'sigil' => 'show-older-link', 138 138 ),