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:
@@ -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,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class PhabricatorDisabledUserController extends PhabricatorAuthController {
|
||||
final class PhabricatorDisabledUserController
|
||||
extends PhabricatorAuthController {
|
||||
|
||||
public function shouldRequireEnabledUser() {
|
||||
return false;
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class PhabricatorEmailLoginController extends PhabricatorAuthController {
|
||||
final class PhabricatorEmailLoginController
|
||||
extends PhabricatorAuthController {
|
||||
|
||||
public function shouldRequireLogin() {
|
||||
return false;
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class PhabricatorEmailTokenController extends PhabricatorAuthController {
|
||||
final class PhabricatorEmailTokenController
|
||||
extends PhabricatorAuthController {
|
||||
|
||||
private $token;
|
||||
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class PhabricatorLoginController extends PhabricatorAuthController {
|
||||
final class PhabricatorLoginController
|
||||
extends PhabricatorAuthController {
|
||||
|
||||
public function shouldRequireLogin() {
|
||||
return false;
|
||||
|
||||
@@ -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,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class PhabricatorLogoutController extends PhabricatorAuthController {
|
||||
final class PhabricatorLogoutController
|
||||
extends PhabricatorAuthController {
|
||||
|
||||
public function shouldRequireLogin() {
|
||||
return true;
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class PhabricatorOAuthLoginController extends PhabricatorAuthController {
|
||||
final class PhabricatorOAuthLoginController
|
||||
extends PhabricatorAuthController {
|
||||
|
||||
private $provider;
|
||||
private $userID;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class PhabricatorOAuthDiagnosticsController
|
||||
final class PhabricatorOAuthDiagnosticsController
|
||||
extends PhabricatorAuthController {
|
||||
|
||||
public function shouldRequireLogin() {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class PhabricatorOAuthDefaultRegistrationController
|
||||
final class PhabricatorOAuthDefaultRegistrationController
|
||||
extends PhabricatorOAuthRegistrationController {
|
||||
|
||||
public function processRequest() {
|
||||
|
||||
@@ -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 PhabricatorRefreshCSRFController extends PhabricatorAuthController {
|
||||
final class PhabricatorRefreshCSRFController extends PhabricatorAuthController {
|
||||
|
||||
public function processRequest() {
|
||||
$request = $this->getRequest();
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class PhabricatorOAuthUnlinkController extends PhabricatorAuthController {
|
||||
final class PhabricatorOAuthUnlinkController extends PhabricatorAuthController {
|
||||
|
||||
private $provider;
|
||||
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class PhabricatorLoginValidateController extends PhabricatorAuthController {
|
||||
final class PhabricatorLoginValidateController
|
||||
extends PhabricatorAuthController {
|
||||
|
||||
public function shouldRequireLogin() {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user