1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 10:12:41 +01:00

Remove "final" from "private" methods in Phabricator

Summary:
Ref T13588. This has never been meaningful, but a "final private" method is specifically forbidden in PHP8.

Remove meaningless "final" from these methods, per new lint checks.

Test Plan: Ran `arc lint --everything` to identify affected methods, then `... | xargs -n1 arc lint --apply-patches`.

Maniphest Tasks: T13588

Differential Revision: https://secure.phabricator.com/D21540
This commit is contained in:
epriestley 2021-02-03 14:10:21 -08:00
parent 365836cd31
commit 9502312b60
6 changed files with 19 additions and 19 deletions

View file

@ -490,7 +490,7 @@ abstract class PhabricatorApplication
return array(); return array();
} }
final private function getCustomPolicySetting($capability) { private function getCustomPolicySetting($capability) {
if (!$this->isCapabilityEditable($capability)) { if (!$this->isCapabilityEditable($capability)) {
return null; return null;
} }
@ -516,7 +516,7 @@ abstract class PhabricatorApplication
} }
final private function getCustomCapabilitySpecification($capability) { private function getCustomCapabilitySpecification($capability) {
$custom = $this->getCustomCapabilities(); $custom = $this->getCustomCapabilities();
if (!isset($custom[$capability])) { if (!isset($custom[$capability])) {
throw new Exception(pht("Unknown capability '%s'!", $capability)); throw new Exception(pht("Unknown capability '%s'!", $capability));

View file

@ -203,7 +203,7 @@ final class DifferentialHunk
return implode('', $this->makeContent($include)); return implode('', $this->makeContent($include));
} }
final private function makeContent($include) { private function makeContent($include) {
$lines = $this->getSplitLines(); $lines = $this->getSplitLines();
$results = array(); $results = array();

View file

@ -125,7 +125,7 @@ abstract class DiffusionRequest extends Phobject {
* *
* @task new * @task new
*/ */
final private function __construct() { private function __construct() {
// <private> // <private>
} }
@ -138,7 +138,7 @@ abstract class DiffusionRequest extends Phobject {
* @return DiffusionRequest New request object. * @return DiffusionRequest New request object.
* @task new * @task new
*/ */
final private static function newFromIdentifier( private static function newFromIdentifier(
$identifier, $identifier,
PhabricatorUser $viewer, PhabricatorUser $viewer,
$need_edit = false) { $need_edit = false) {
@ -174,7 +174,7 @@ abstract class DiffusionRequest extends Phobject {
* @return DiffusionRequest New request object. * @return DiffusionRequest New request object.
* @task new * @task new
*/ */
final private static function newFromRepository( private static function newFromRepository(
PhabricatorRepository $repository) { PhabricatorRepository $repository) {
$map = array( $map = array(
@ -205,7 +205,7 @@ abstract class DiffusionRequest extends Phobject {
* @return void * @return void
* @task new * @task new
*/ */
final private function initializeFromDictionary(array $data) { private function initializeFromDictionary(array $data) {
$blob = idx($data, 'blob'); $blob = idx($data, 'blob');
if (strlen($blob)) { if (strlen($blob)) {
$blob = self::parseRequestBlob($blob, $this->supportsBranches()); $blob = self::parseRequestBlob($blob, $this->supportsBranches());

View file

@ -1389,7 +1389,7 @@ abstract class PhabricatorApplicationTransactionEditor
return $xactions; return $xactions;
} }
final private function queuePublishing() { private function queuePublishing() {
$object = $this->publishableObject; $object = $this->publishableObject;
$xactions = $this->publishableTransactions; $xactions = $this->publishableTransactions;
@ -4207,7 +4207,7 @@ abstract class PhabricatorApplicationTransactionEditor
* @return dict<string, wild> Serializable editor state. * @return dict<string, wild> Serializable editor state.
* @task workers * @task workers
*/ */
final private function getWorkerState() { private function getWorkerState() {
$state = array(); $state = array();
foreach ($this->getAutomaticStateProperties() as $property) { foreach ($this->getAutomaticStateProperties() as $property) {
$state[$property] = $this->$property; $state[$property] = $this->$property;
@ -4336,7 +4336,7 @@ abstract class PhabricatorApplicationTransactionEditor
* @return map<string, wild> Map of encoded values. * @return map<string, wild> Map of encoded values.
* @task workers * @task workers
*/ */
final private function encodeStateForStorage( private function encodeStateForStorage(
array $state, array $state,
array $encodings) { array $encodings) {
@ -4382,7 +4382,7 @@ abstract class PhabricatorApplicationTransactionEditor
* @return map<string, wild> Map of decoded values. * @return map<string, wild> Map of decoded values.
* @task workers * @task workers
*/ */
final private function decodeStateFromStorage( private function decodeStateFromStorage(
array $state, array $state,
array $encodings) { array $encodings) {

View file

@ -135,7 +135,7 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery
); );
} }
final private function getExternalCursorStringForResult($object) { private function getExternalCursorStringForResult($object) {
$cursor = $this->newExternalCursorStringForResult($object); $cursor = $this->newExternalCursorStringForResult($object);
if (!is_string($cursor)) { if (!is_string($cursor)) {
@ -154,7 +154,7 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery
return $this->externalCursorString; return $this->externalCursorString;
} }
final private function setExternalCursorString($external_cursor) { private function setExternalCursorString($external_cursor) {
$this->externalCursorString = $external_cursor; $this->externalCursorString = $external_cursor;
return $this; return $this;
} }
@ -168,17 +168,17 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery
return $this; return $this;
} }
final private function getInternalCursorObject() { private function getInternalCursorObject() {
return $this->internalCursorObject; return $this->internalCursorObject;
} }
final private function setInternalCursorObject( private function setInternalCursorObject(
PhabricatorQueryCursor $cursor) { PhabricatorQueryCursor $cursor) {
$this->internalCursorObject = $cursor; $this->internalCursorObject = $cursor;
return $this; return $this;
} }
final private function getInternalCursorFromExternalCursor( private function getInternalCursorFromExternalCursor(
$cursor_string) { $cursor_string) {
$cursor_object = $this->newInternalCursorFromExternalCursor($cursor_string); $cursor_object = $this->newInternalCursorFromExternalCursor($cursor_string);
@ -196,7 +196,7 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery
return $cursor_object; return $cursor_object;
} }
final private function getPagingMapFromCursorObject( private function getPagingMapFromCursorObject(
PhabricatorQueryCursor $cursor, PhabricatorQueryCursor $cursor,
array $keys) { array $keys) {

View file

@ -156,7 +156,7 @@ abstract class PhabricatorStorageManagementWorkflow
return $err; return $err;
} }
final private function doAdjustSchemata( private function doAdjustSchemata(
PhabricatorStorageManagementAPI $api, PhabricatorStorageManagementAPI $api,
$unsafe) { $unsafe) {
@ -913,7 +913,7 @@ abstract class PhabricatorStorageManagementWorkflow
} }
} }
final private function doUpgradeSchemata( private function doUpgradeSchemata(
array $apis, array $apis,
$apply_only, $apply_only,
$no_quickstart, $no_quickstart,