Add "final" to all Phabricator "Controller" classes

Summary:
These are all unambiguously unextensible. Issues I hit:

  - Maniphest Change/Diff controllers, just consolidated them.
  - Some search controllers incorrectly extend from "Search" but should extend from "SearchBase". This has no runtime effects.
  - D1836 introduced a closure, which we don't handle correctly (somewhat on purpose; we target PHP 5.2). See T962.

Test Plan: Ran "testEverythingImplemented" unit test to identify classes extending from `final` classes. Resolved issues.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T795

Differential Revision: https://secure.phabricator.com/D1843
This commit is contained in:
epriestley
2012-03-09 15:46:25 -08:00
parent 1bff43a0c3
commit b2890eeb0e
158 changed files with 276 additions and 273 deletions

View File

@@ -16,7 +16,7 @@
* limitations under the License.
*/
class DifferentialChangesetViewController extends DifferentialController {
final class DifferentialChangesetViewController extends DifferentialController {
public function shouldRequireLogin() {

View File

@@ -16,7 +16,8 @@
* limitations under the License.
*/
class DifferentialCommentPreviewController extends DifferentialController {
final class DifferentialCommentPreviewController
extends DifferentialController {
private $id;

View File

@@ -16,7 +16,7 @@
* limitations under the License.
*/
class DifferentialCommentSaveController extends DifferentialController {
final class DifferentialCommentSaveController extends DifferentialController {
public function processRequest() {
$request = $this->getRequest();

View File

@@ -1,7 +1,7 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
* Copyright 2012 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
* limitations under the License.
*/
class DifferentialDiffCreateController extends DifferentialController {
final class DifferentialDiffCreateController extends DifferentialController {
public function processRequest() {

View File

@@ -16,7 +16,7 @@
* limitations under the License.
*/
class DifferentialDiffViewController extends DifferentialController {
final class DifferentialDiffViewController extends DifferentialController {
private $id;

View File

@@ -16,7 +16,8 @@
* limitations under the License.
*/
class DifferentialInlineCommentEditController extends DifferentialController {
final class DifferentialInlineCommentEditController
extends DifferentialController {
private $revisionID;

View File

@@ -1,7 +1,7 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
* Copyright 2012 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
* limitations under the License.
*/
class DifferentialInlineCommentPreviewController
final class DifferentialInlineCommentPreviewController
extends DifferentialController {
private $revisionID;

View File

@@ -1,7 +1,7 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
* Copyright 2012 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
* limitations under the License.
*/
class DifferentialRevisionEditController extends DifferentialController {
final class DifferentialRevisionEditController extends DifferentialController {
private $id;

View File

@@ -16,7 +16,7 @@
* limitations under the License.
*/
class DifferentialRevisionListController extends DifferentialController {
final class DifferentialRevisionListController extends DifferentialController {
private $filter;
private $username;

View File

@@ -16,7 +16,7 @@
* limitations under the License.
*/
class DifferentialRevisionStatsController extends DifferentialController {
final class DifferentialRevisionStatsController extends DifferentialController {
private $filter;
public function shouldRequireLogin() {

View File

@@ -16,7 +16,7 @@
* limitations under the License.
*/
class DifferentialRevisionViewController extends DifferentialController {
final class DifferentialRevisionViewController extends DifferentialController {
private $revisionID;

View File

@@ -1,7 +1,7 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
* Copyright 2012 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
* limitations under the License.
*/
class DifferentialSubscribeController extends DifferentialController {
final class DifferentialSubscribeController extends DifferentialController {
private $id;
private $action;