1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-21 22:32:41 +01:00

Remove final from private functions for PHP 8 compatibility

Summary:
This combination does not make sense and PHP 8 errors with:

```
Private methods cannot be final as they are never overridden by other classes
```

Thus remove the redundant final from all such functions.

Test Plan: Used to create this revision with PHP 8 on macOS

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D21496
This commit is contained in:
Jessica Clarke 2021-01-10 22:05:20 +00:00 committed by jrtc27
parent 4b3baca999
commit 3ab2b407db
5 changed files with 14 additions and 14 deletions

View file

@ -274,7 +274,7 @@ abstract class ArcanistLintEngine extends Phobject {
return ArcanistLintSeverity::isAtLeastAsSevere($severity, $minimum);
}
final private function shouldUseCache(
private function shouldUseCache(
$cache_granularity,
$repository_version) {
@ -313,7 +313,7 @@ abstract class ArcanistLintEngine extends Phobject {
return $this;
}
final private function isRelevantMessage(ArcanistLintMessage $message) {
private function isRelevantMessage(ArcanistLintMessage $message) {
// When a user runs "arc lint", we default to raising only warnings on
// lines they have changed (errors are still raised anywhere in the
// file). The list of $changed lines may be null, to indicate that the

View file

@ -291,7 +291,7 @@ abstract class ArcanistLinter extends Phobject {
* @param list<string>
* @return list<string>
*/
final private function filterPaths(array $paths) {
private function filterPaths(array $paths) {
$engine = $this->getEngine();
$keep = array();

View file

@ -408,7 +408,7 @@ abstract class PhutilTestCase extends Phobject {
*
* @task internal
*/
final private function failTest($reason) {
private function failTest($reason) {
$this->resultTest(ArcanistUnitTestResult::RESULT_FAIL, $reason);
}
@ -421,7 +421,7 @@ abstract class PhutilTestCase extends Phobject {
*
* @task internal
*/
final private function passTest($reason) {
private function passTest($reason) {
$this->resultTest(ArcanistUnitTestResult::RESULT_PASS, $reason);
}
@ -433,12 +433,12 @@ abstract class PhutilTestCase extends Phobject {
* @return void
* @task internal
*/
final private function skipTest($reason) {
private function skipTest($reason) {
$this->resultTest(ArcanistUnitTestResult::RESULT_SKIP, $reason);
}
final private function resultTest($test_result, $reason) {
private function resultTest($test_result, $reason) {
$coverage = $this->endCoverage();
$result = new ArcanistUnitTestResult();
@ -553,7 +553,7 @@ abstract class PhutilTestCase extends Phobject {
/**
* @phutil-external-symbol function xdebug_start_code_coverage
*/
final private function beginCoverage() {
private function beginCoverage() {
if (!$this->enableCoverage) {
return;
}
@ -566,7 +566,7 @@ abstract class PhutilTestCase extends Phobject {
* @phutil-external-symbol function xdebug_get_code_coverage
* @phutil-external-symbol function xdebug_stop_code_coverage
*/
final private function endCoverage() {
private function endCoverage() {
if (!$this->enableCoverage) {
return;
}
@ -618,7 +618,7 @@ abstract class PhutilTestCase extends Phobject {
return $coverage;
}
final private function assertCoverageAvailable() {
private function assertCoverageAvailable() {
if (!function_exists('xdebug_start_code_coverage')) {
throw new Exception(
pht("You've enabled code coverage but XDebug is not installed."));
@ -675,7 +675,7 @@ abstract class PhutilTestCase extends Phobject {
*
* @return map
*/
final private static function getCallerInfo() {
private static function getCallerInfo() {
$callee = array();
$caller = array();
$seen = false;

View file

@ -318,7 +318,7 @@ abstract class AbstractDirectedGraph extends Phobject {
* which cycle.
* @task cycle
*/
final private function performCycleDetection($node, array $visited) {
private function performCycleDetection($node, array $visited) {
$visited[$node] = true;
foreach ($this->knownNodes[$node] as $edge) {
if (isset($visited[$edge])) {

View file

@ -728,7 +728,7 @@ abstract class ArcanistWorkflow extends Phobject {
return $this->workingDirectory;
}
final private function setParentWorkflow($parent_workflow) {
private function setParentWorkflow($parent_workflow) {
$this->parentWorkflow = $parent_workflow;
return $this;
}
@ -1377,7 +1377,7 @@ abstract class ArcanistWorkflow extends Phobject {
));
}
final private function loadBundleFromConduit(
private function loadBundleFromConduit(
ConduitClient $conduit,
$params) {