diff --git a/src/aphront/handler/AphrontRequestExceptionHandler.php b/src/aphront/handler/AphrontRequestExceptionHandler.php index e626f53cc6..6f5a23ae05 100644 --- a/src/aphront/handler/AphrontRequestExceptionHandler.php +++ b/src/aphront/handler/AphrontRequestExceptionHandler.php @@ -22,7 +22,7 @@ abstract class AphrontRequestExceptionHandler extends Phobject { final public static function getAllHandlers() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setSortMethod('getRequestExceptionHandlerPriority') ->execute(); } diff --git a/src/aphront/httpparametertype/AphrontHTTPParameterType.php b/src/aphront/httpparametertype/AphrontHTTPParameterType.php index c9c415bf78..93c1d68931 100644 --- a/src/aphront/httpparametertype/AphrontHTTPParameterType.php +++ b/src/aphront/httpparametertype/AphrontHTTPParameterType.php @@ -214,7 +214,7 @@ abstract class AphrontHTTPParameterType extends Phobject { */ final public static function getAllTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getTypeName') ->setSortMethod('getTypeName') ->execute(); diff --git a/src/aphront/response/AphrontProxyResponse.php b/src/aphront/response/AphrontProxyResponse.php index eda9e9b719..ca3a1bccf9 100644 --- a/src/aphront/response/AphrontProxyResponse.php +++ b/src/aphront/response/AphrontProxyResponse.php @@ -74,7 +74,7 @@ abstract class AphrontProxyResponse throw new Exception( pht( '%s must implement %s.', - __CLASS__, + self::class, 'reduceProxyResponse()')); } diff --git a/src/aphront/response/AphrontResponse.php b/src/aphront/response/AphrontResponse.php index 355177e316..7f48e250a3 100644 --- a/src/aphront/response/AphrontResponse.php +++ b/src/aphront/response/AphrontResponse.php @@ -339,7 +339,7 @@ abstract class AphrontResponse extends Phobject { array_walk_recursive( $object, - array(__CLASS__, 'processValueForJSONEncoding')); + array(self::class, 'processValueForJSONEncoding')); $response = phutil_json_encode($object); diff --git a/src/aphront/site/AphrontSite.php b/src/aphront/site/AphrontSite.php index 08813462c6..41ff1de386 100644 --- a/src/aphront/site/AphrontSite.php +++ b/src/aphront/site/AphrontSite.php @@ -36,7 +36,7 @@ abstract class AphrontSite extends Phobject { final public static function getAllSites() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setSortMethod('getPriority') ->execute(); } diff --git a/src/aphront/writeguard/AphrontWriteGuard.php b/src/aphront/writeguard/AphrontWriteGuard.php index 672e06b7a3..1435f30e71 100644 --- a/src/aphront/writeguard/AphrontWriteGuard.php +++ b/src/aphront/writeguard/AphrontWriteGuard.php @@ -67,7 +67,7 @@ final class AphrontWriteGuard extends Phobject { pht( 'An %s already exists. Dispose of the previous guard '. 'before creating a new one.', - __CLASS__)); + self::class)); } if (self::$allowUnguardedWrites) { throw new Exception( @@ -75,7 +75,7 @@ final class AphrontWriteGuard extends Phobject { 'An %s is being created in a context which permits '. 'unguarded writes unconditionally. This is not allowed and '. 'indicates a serious error.', - __CLASS__)); + self::class)); } $this->callback = $callback; self::$instance = $this; @@ -99,7 +99,7 @@ final class AphrontWriteGuard extends Phobject { throw new Exception( pht( 'Imbalanced %s: more %s calls than %s calls.', - __CLASS__, + self::class, 'beginUnguardedWrites()', 'endUnguardedWrites()')); } @@ -155,7 +155,7 @@ final class AphrontWriteGuard extends Phobject { throw new Exception( pht( 'Unguarded write! There must be an active %s to perform writes.', - __CLASS__)); + self::class)); } else { // Unguarded writes are being allowed unconditionally. return; @@ -231,7 +231,7 @@ final class AphrontWriteGuard extends Phobject { throw new Exception( pht( 'Imbalanced %s: more %s calls than %s calls.', - __CLASS__, + self::class, 'endUnguardedWrites()', 'beginUnguardedWrites()')); } @@ -257,7 +257,7 @@ final class AphrontWriteGuard extends Phobject { pht( 'You can not unconditionally disable %s by calling %s while a write '. 'guard is active. Use %s to temporarily allow unguarded writes.', - __CLASS__, + self::class, __FUNCTION__.'()', 'beginUnguardedWrites()')); } diff --git a/src/applications/almanac/servicetype/AlmanacServiceType.php b/src/applications/almanac/servicetype/AlmanacServiceType.php index 2f7f503fe8..c56ac660e6 100644 --- a/src/applications/almanac/servicetype/AlmanacServiceType.php +++ b/src/applications/almanac/servicetype/AlmanacServiceType.php @@ -71,7 +71,7 @@ abstract class AlmanacServiceType extends Phobject { */ public static function getAllServiceTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getServiceTypeConstant') ->setSortMethod('getServiceTypeName') ->execute(); diff --git a/src/applications/auth/engine/PhabricatorAuthSessionEngineExtension.php b/src/applications/auth/engine/PhabricatorAuthSessionEngineExtension.php index aa4b75db26..158c8bf43b 100644 --- a/src/applications/auth/engine/PhabricatorAuthSessionEngineExtension.php +++ b/src/applications/auth/engine/PhabricatorAuthSessionEngineExtension.php @@ -9,7 +9,7 @@ abstract class PhabricatorAuthSessionEngineExtension final public static function getAllExtensions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getExtensionKey') ->execute(); } diff --git a/src/applications/auth/factor/PhabricatorAuthFactor.php b/src/applications/auth/factor/PhabricatorAuthFactor.php index 79ea17de7f..f7f6c52650 100644 --- a/src/applications/auth/factor/PhabricatorAuthFactor.php +++ b/src/applications/auth/factor/PhabricatorAuthFactor.php @@ -27,7 +27,7 @@ abstract class PhabricatorAuthFactor extends Phobject { public static function getAllFactors() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getFactorKey') ->execute(); } diff --git a/src/applications/auth/message/PhabricatorAuthMessageType.php b/src/applications/auth/message/PhabricatorAuthMessageType.php index 9474eee1f3..950edee230 100644 --- a/src/applications/auth/message/PhabricatorAuthMessageType.php +++ b/src/applications/auth/message/PhabricatorAuthMessageType.php @@ -9,7 +9,7 @@ abstract class PhabricatorAuthMessageType final public static function getAllMessageTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getMessageTypeKey') ->execute(); } diff --git a/src/applications/auth/provider/PhabricatorAuthProvider.php b/src/applications/auth/provider/PhabricatorAuthProvider.php index b9f3224585..71e3146744 100644 --- a/src/applications/auth/provider/PhabricatorAuthProvider.php +++ b/src/applications/auth/provider/PhabricatorAuthProvider.php @@ -60,7 +60,7 @@ abstract class PhabricatorAuthProvider extends Phobject { public static function getAllBaseProviders() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->execute(); } diff --git a/src/applications/auth/revoker/PhabricatorAuthRevoker.php b/src/applications/auth/revoker/PhabricatorAuthRevoker.php index 9bf44b05bc..a18cd39ad5 100644 --- a/src/applications/auth/revoker/PhabricatorAuthRevoker.php +++ b/src/applications/auth/revoker/PhabricatorAuthRevoker.php @@ -30,7 +30,7 @@ abstract class PhabricatorAuthRevoker final public static function getAllRevokers() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getRevokerKey') ->execute(); } diff --git a/src/applications/auth/storage/PhabricatorAuthChallenge.php b/src/applications/auth/storage/PhabricatorAuthChallenge.php index 05d00c3e6e..04e0ff2d8e 100644 --- a/src/applications/auth/storage/PhabricatorAuthChallenge.php +++ b/src/applications/auth/storage/PhabricatorAuthChallenge.php @@ -27,7 +27,7 @@ final class PhabricatorAuthChallenge } public static function newHTTPParametersFromChallenges(array $challenges) { - assert_instances_of($challenges, __CLASS__); + assert_instances_of($challenges, self::class); $token_list = array(); foreach ($challenges as $challenge) { @@ -54,7 +54,7 @@ final class PhabricatorAuthChallenge public static function newChallengeResponsesFromRequest( array $challenges, AphrontRequest $request) { - assert_instances_of($challenges, __CLASS__); + assert_instances_of($challenges, self::class); $token_list = $request->getStr(self::HTTPKEY, ''); $token_list = explode(' ', $token_list); diff --git a/src/applications/auth/tokentype/PhabricatorAuthTemporaryTokenType.php b/src/applications/auth/tokentype/PhabricatorAuthTemporaryTokenType.php index 842afd720e..b119f0fd17 100644 --- a/src/applications/auth/tokentype/PhabricatorAuthTemporaryTokenType.php +++ b/src/applications/auth/tokentype/PhabricatorAuthTemporaryTokenType.php @@ -17,7 +17,7 @@ abstract class PhabricatorAuthTemporaryTokenType final public static function getAllTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getTokenTypeConstant') ->execute(); } diff --git a/src/applications/base/PhabricatorApplication.php b/src/applications/base/PhabricatorApplication.php index 45909a92cd..3702fdce5b 100644 --- a/src/applications/base/PhabricatorApplication.php +++ b/src/applications/base/PhabricatorApplication.php @@ -371,7 +371,7 @@ abstract class PhabricatorApplication if ($applications === null) { $apps = id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setSortMethod('getApplicationOrder') ->execute(); diff --git a/src/applications/cache/purger/PhabricatorCachePurger.php b/src/applications/cache/purger/PhabricatorCachePurger.php index 0115b45d7e..714c9b0145 100644 --- a/src/applications/cache/purger/PhabricatorCachePurger.php +++ b/src/applications/cache/purger/PhabricatorCachePurger.php @@ -22,7 +22,7 @@ abstract class PhabricatorCachePurger final public static function getAllPurgers() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getPurgerKey') ->execute(); } diff --git a/src/applications/calendar/import/PhabricatorCalendarImportEngine.php b/src/applications/calendar/import/PhabricatorCalendarImportEngine.php index 02b72e7498..ab3672fc06 100644 --- a/src/applications/calendar/import/PhabricatorCalendarImportEngine.php +++ b/src/applications/calendar/import/PhabricatorCalendarImportEngine.php @@ -46,7 +46,7 @@ abstract class PhabricatorCalendarImportEngine final public static function getAllImportEngines() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getImportEngineType') ->setSortMethod('getImportEngineName') ->execute(); diff --git a/src/applications/calendar/importlog/PhabricatorCalendarImportLogType.php b/src/applications/calendar/importlog/PhabricatorCalendarImportLogType.php index a6c4ca4ec3..ee3179808d 100644 --- a/src/applications/calendar/importlog/PhabricatorCalendarImportLogType.php +++ b/src/applications/calendar/importlog/PhabricatorCalendarImportLogType.php @@ -9,7 +9,7 @@ abstract class PhabricatorCalendarImportLogType final public static function getAllLogTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getLogTypeConstant') ->execute(); } diff --git a/src/applications/celerity/postprocessor/CelerityPostprocessor.php b/src/applications/celerity/postprocessor/CelerityPostprocessor.php index 81c1cb8913..a27c2c20c9 100644 --- a/src/applications/celerity/postprocessor/CelerityPostprocessor.php +++ b/src/applications/celerity/postprocessor/CelerityPostprocessor.php @@ -37,7 +37,7 @@ abstract class CelerityPostprocessor final public static function getAllPostprocessors() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getPostprocessorKey') ->execute(); } diff --git a/src/applications/celerity/resources/CelerityPhysicalResources.php b/src/applications/celerity/resources/CelerityPhysicalResources.php index 89f0d150a6..f118973296 100644 --- a/src/applications/celerity/resources/CelerityPhysicalResources.php +++ b/src/applications/celerity/resources/CelerityPhysicalResources.php @@ -24,7 +24,7 @@ abstract class CelerityPhysicalResources extends CelerityResources { if ($resources_map === null) { $resources_list = id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getName') ->execute(); diff --git a/src/applications/conduit/method/ConduitAPIMethod.php b/src/applications/conduit/method/ConduitAPIMethod.php index e63fab5319..1d55947246 100644 --- a/src/applications/conduit/method/ConduitAPIMethod.php +++ b/src/applications/conduit/method/ConduitAPIMethod.php @@ -219,7 +219,7 @@ abstract class ConduitAPIMethod private static function newClassMapQuery() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getAPIMethodName'); } diff --git a/src/applications/conduit/parametertype/ConduitParameterType.php b/src/applications/conduit/parametertype/ConduitParameterType.php index 9adf435cf2..f592aedf4d 100644 --- a/src/applications/conduit/parametertype/ConduitParameterType.php +++ b/src/applications/conduit/parametertype/ConduitParameterType.php @@ -74,7 +74,7 @@ abstract class ConduitParameterType extends Phobject { final public static function getAllTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getTypeName') ->setSortMethod('getTypeName') ->execute(); diff --git a/src/applications/config/check/PhabricatorSetupCheck.php b/src/applications/config/check/PhabricatorSetupCheck.php index e1ca2a004d..29ffcac226 100644 --- a/src/applications/config/check/PhabricatorSetupCheck.php +++ b/src/applications/config/check/PhabricatorSetupCheck.php @@ -239,7 +239,7 @@ abstract class PhabricatorSetupCheck extends Phobject { final public static function loadAllChecks() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setSortMethod('getExecutionOrder') ->execute(); } diff --git a/src/applications/config/module/PhabricatorConfigModule.php b/src/applications/config/module/PhabricatorConfigModule.php index 05625e5d50..5ba8ce1049 100644 --- a/src/applications/config/module/PhabricatorConfigModule.php +++ b/src/applications/config/module/PhabricatorConfigModule.php @@ -8,7 +8,7 @@ abstract class PhabricatorConfigModule extends Phobject { final public static function getAllModules() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getModuleKey') ->setSortMethod('getModuleName') ->execute(); diff --git a/src/applications/config/option/PhabricatorApplicationConfigOptions.php b/src/applications/config/option/PhabricatorApplicationConfigOptions.php index c7b7d15215..64dcd2394d 100644 --- a/src/applications/config/option/PhabricatorApplicationConfigOptions.php +++ b/src/applications/config/option/PhabricatorApplicationConfigOptions.php @@ -98,7 +98,7 @@ abstract class PhabricatorApplicationConfigOptions extends Phobject { final public static function loadAll($external_only = false) { $symbols = id(new PhutilSymbolLoader()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setConcreteOnly(true) ->selectAndLoadSymbols(); @@ -117,7 +117,7 @@ abstract class PhabricatorApplicationConfigOptions extends Phobject { throw new Exception( pht( "Multiple %s subclasses have the same key ('%s'): %s, %s.", - __CLASS__, + self::class, $key, $pclass, $nclass)); @@ -139,7 +139,7 @@ abstract class PhabricatorApplicationConfigOptions extends Phobject { throw new Exception( pht( "Multiple %s subclasses contain an option named '%s'!", - __CLASS__, + self::class, $key)); } $options[$key] = $option; diff --git a/src/applications/config/type/PhabricatorConfigType.php b/src/applications/config/type/PhabricatorConfigType.php index 2968d00d18..2405f4e1c1 100644 --- a/src/applications/config/type/PhabricatorConfigType.php +++ b/src/applications/config/type/PhabricatorConfigType.php @@ -8,7 +8,7 @@ abstract class PhabricatorConfigType extends Phobject { final public static function getAllTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getTypeKey') ->execute(); } diff --git a/src/applications/conpherence/storage/ConpherenceThread.php b/src/applications/conpherence/storage/ConpherenceThread.php index a2150662c6..4fc027ad21 100644 --- a/src/applications/conpherence/storage/ConpherenceThread.php +++ b/src/applications/conpherence/storage/ConpherenceThread.php @@ -278,7 +278,7 @@ final class ConpherenceThread extends ConpherenceDAO PhabricatorUser $viewer, array $conpherences) { - assert_instances_of($conpherences, __CLASS__); + assert_instances_of($conpherences, self::class); $policies = array(); foreach ($conpherences as $room) { diff --git a/src/applications/console/plugin/errorlog/DarkConsoleErrorLogPluginAPI.php b/src/applications/console/plugin/errorlog/DarkConsoleErrorLogPluginAPI.php index fb092ec763..15804b2002 100644 --- a/src/applications/console/plugin/errorlog/DarkConsoleErrorLogPluginAPI.php +++ b/src/applications/console/plugin/errorlog/DarkConsoleErrorLogPluginAPI.php @@ -12,7 +12,7 @@ final class DarkConsoleErrorLogPluginAPI extends Phobject { // reenter autoloaders). PhutilReadableSerializer::printableValue(null); PhutilErrorHandler::setErrorListener( - array(__CLASS__, 'handleErrors')); + array(self::class, 'handleErrors')); } public static function enableDiscardMode() { diff --git a/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php b/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php index 9c3b8f7b4a..99ee79ff80 100644 --- a/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php +++ b/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php @@ -152,7 +152,7 @@ abstract class PhabricatorDaemonManagementWorkflow // subprocess which will terminate normally. pcntl_signal( SIGINT, - array(__CLASS__, 'ignoreSignal')); + array(self::class, 'ignoreSignal')); echo "\n scripts/daemon/ \$ {$command}\n\n"; diff --git a/src/applications/dashboard/install/PhabricatorDashboardInstallWorkflow.php b/src/applications/dashboard/install/PhabricatorDashboardInstallWorkflow.php index fb77cdebe3..0c5be7569a 100644 --- a/src/applications/dashboard/install/PhabricatorDashboardInstallWorkflow.php +++ b/src/applications/dashboard/install/PhabricatorDashboardInstallWorkflow.php @@ -50,7 +50,7 @@ abstract class PhabricatorDashboardInstallWorkflow final public static function getAllWorkflows() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getWorkflowKey') ->setSortMethod('getOrder') ->execute(); diff --git a/src/applications/dashboard/layoutconfig/PhabricatorDashboardLayoutMode.php b/src/applications/dashboard/layoutconfig/PhabricatorDashboardLayoutMode.php index 965adbe1d7..8e9f7769a3 100644 --- a/src/applications/dashboard/layoutconfig/PhabricatorDashboardLayoutMode.php +++ b/src/applications/dashboard/layoutconfig/PhabricatorDashboardLayoutMode.php @@ -20,7 +20,7 @@ abstract class PhabricatorDashboardLayoutMode final public static function getAllLayoutModes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getLayoutModeKey') ->setSortMethod('getLayoutModeOrder') ->execute(); diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardPanelType.php index ecb1658f44..efe64f21f3 100644 --- a/src/applications/dashboard/paneltype/PhabricatorDashboardPanelType.php +++ b/src/applications/dashboard/paneltype/PhabricatorDashboardPanelType.php @@ -40,7 +40,7 @@ abstract class PhabricatorDashboardPanelType extends Phobject { public static function getAllPanelTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getPanelTypeKey') ->execute(); } diff --git a/src/applications/differential/field/DifferentialCommitMessageField.php b/src/applications/differential/field/DifferentialCommitMessageField.php index 55c5ce0dad..1fbc4a251f 100644 --- a/src/applications/differential/field/DifferentialCommitMessageField.php +++ b/src/applications/differential/field/DifferentialCommitMessageField.php @@ -95,7 +95,7 @@ abstract class DifferentialCommitMessageField final public static function getAllFields() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getCommitMessageFieldKey') ->setSortMethod('getFieldOrder') ->execute(); diff --git a/src/applications/differential/query/DifferentialRevisionResultBucket.php b/src/applications/differential/query/DifferentialRevisionResultBucket.php index c5cc5c0e6c..95a6ed8a26 100644 --- a/src/applications/differential/query/DifferentialRevisionResultBucket.php +++ b/src/applications/differential/query/DifferentialRevisionResultBucket.php @@ -5,7 +5,7 @@ abstract class DifferentialRevisionResultBucket public static function getAllResultBuckets() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getResultBucketKey') ->execute(); } diff --git a/src/applications/differential/xaction/DifferentialRevisionActionTransaction.php b/src/applications/differential/xaction/DifferentialRevisionActionTransaction.php index b1f51e77e7..cfc4a43e04 100644 --- a/src/applications/differential/xaction/DifferentialRevisionActionTransaction.php +++ b/src/applications/differential/xaction/DifferentialRevisionActionTransaction.php @@ -74,7 +74,7 @@ abstract class DifferentialRevisionActionTransaction public static function loadAllActions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getRevisionActionKey') ->execute(); } diff --git a/src/applications/diffusion/data/DiffusionPathChange.php b/src/applications/diffusion/data/DiffusionPathChange.php index 02db490d4d..e9e43616c9 100644 --- a/src/applications/diffusion/data/DiffusionPathChange.php +++ b/src/applications/diffusion/data/DiffusionPathChange.php @@ -117,7 +117,7 @@ final class DiffusionPathChange extends Phobject { } public static function convertToArcanistChanges(array $changes) { - assert_instances_of($changes, __CLASS__); + assert_instances_of($changes, self::class); $direct = array(); $result = array(); foreach ($changes as $path) { @@ -143,7 +143,7 @@ final class DiffusionPathChange extends Phobject { public static function convertToDifferentialChangesets( PhabricatorUser $user, array $changes) { - assert_instances_of($changes, __CLASS__); + assert_instances_of($changes, self::class); $arcanist_changes = self::convertToArcanistChanges($changes); $diff = DifferentialDiff::newEphemeralFromRawChanges( $arcanist_changes); diff --git a/src/applications/diffusion/management/DiffusionRepositoryManagementPanel.php b/src/applications/diffusion/management/DiffusionRepositoryManagementPanel.php index d938ed834c..5d4602acbf 100644 --- a/src/applications/diffusion/management/DiffusionRepositoryManagementPanel.php +++ b/src/applications/diffusion/management/DiffusionRepositoryManagementPanel.php @@ -58,7 +58,7 @@ abstract class DiffusionRepositoryManagementPanel public static function getAllPanels() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getManagementPanelKey') ->setSortMethod('getManagementPanelOrder') ->execute(); diff --git a/src/applications/diffusion/management/DiffusionRepositoryManagementPanelGroup.php b/src/applications/diffusion/management/DiffusionRepositoryManagementPanelGroup.php index 61e3f19c3b..35f6ccaae4 100644 --- a/src/applications/diffusion/management/DiffusionRepositoryManagementPanelGroup.php +++ b/src/applications/diffusion/management/DiffusionRepositoryManagementPanelGroup.php @@ -12,7 +12,7 @@ abstract class DiffusionRepositoryManagementPanelGroup public static function getAllPanelGroups() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getManagementPanelGroupKey') ->setSortMethod('getManagementPanelGroupOrder') ->execute(); diff --git a/src/applications/diffusion/protocol/DiffusionCommandEngine.php b/src/applications/diffusion/protocol/DiffusionCommandEngine.php index 0a31183c82..53f27baf66 100644 --- a/src/applications/diffusion/protocol/DiffusionCommandEngine.php +++ b/src/applications/diffusion/protocol/DiffusionCommandEngine.php @@ -30,7 +30,7 @@ abstract class DiffusionCommandEngine extends Phobject { private static function newCommandEngines() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->execute(); } diff --git a/src/applications/diffusion/query/DiffusionCommitResultBucket.php b/src/applications/diffusion/query/DiffusionCommitResultBucket.php index 28d80aa56c..8ef1e4b369 100644 --- a/src/applications/diffusion/query/DiffusionCommitResultBucket.php +++ b/src/applications/diffusion/query/DiffusionCommitResultBucket.php @@ -5,7 +5,7 @@ abstract class DiffusionCommitResultBucket public static function getAllResultBuckets() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getResultBucketKey') ->execute(); } diff --git a/src/applications/diffusion/query/blame/DiffusionBlameQuery.php b/src/applications/diffusion/query/blame/DiffusionBlameQuery.php index 1c2221eae3..edbd93fc96 100644 --- a/src/applications/diffusion/query/blame/DiffusionBlameQuery.php +++ b/src/applications/diffusion/query/blame/DiffusionBlameQuery.php @@ -29,7 +29,7 @@ abstract class DiffusionBlameQuery extends DiffusionQuery { final public static function newFromDiffusionRequest( DiffusionRequest $request) { - return parent::newQueryObject(__CLASS__, $request); + return parent::newQueryObject(self::class, $request); } final protected function executeQuery() { diff --git a/src/applications/diffusion/query/filecontent/DiffusionFileContentQuery.php b/src/applications/diffusion/query/filecontent/DiffusionFileContentQuery.php index 4165b4dc72..2ef1d67f89 100644 --- a/src/applications/diffusion/query/filecontent/DiffusionFileContentQuery.php +++ b/src/applications/diffusion/query/filecontent/DiffusionFileContentQuery.php @@ -5,7 +5,7 @@ abstract class DiffusionFileContentQuery final public static function newFromDiffusionRequest( DiffusionRequest $request) { - return parent::newQueryObject(__CLASS__, $request); + return parent::newQueryObject(self::class, $request); } } diff --git a/src/applications/diffusion/query/rawdiff/DiffusionRawDiffQuery.php b/src/applications/diffusion/query/rawdiff/DiffusionRawDiffQuery.php index 37d8a68068..050428baeb 100644 --- a/src/applications/diffusion/query/rawdiff/DiffusionRawDiffQuery.php +++ b/src/applications/diffusion/query/rawdiff/DiffusionRawDiffQuery.php @@ -9,7 +9,7 @@ abstract class DiffusionRawDiffQuery final public static function newFromDiffusionRequest( DiffusionRequest $request) { - return parent::newQueryObject(__CLASS__, $request); + return parent::newQueryObject(self::class, $request); } final public function setLinesOfContext($lines_of_context) { diff --git a/src/applications/diffusion/xaction/DiffusionCommitActionTransaction.php b/src/applications/diffusion/xaction/DiffusionCommitActionTransaction.php index d381602766..e62233518e 100644 --- a/src/applications/diffusion/xaction/DiffusionCommitActionTransaction.php +++ b/src/applications/diffusion/xaction/DiffusionCommitActionTransaction.php @@ -53,7 +53,7 @@ abstract class DiffusionCommitActionTransaction public static function loadAllActions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getCommitActionKey') ->execute(); } diff --git a/src/applications/diviner/storage/DivinerLiveSymbol.php b/src/applications/diviner/storage/DivinerLiveSymbol.php index 1be38a4c06..3d76110acb 100644 --- a/src/applications/diviner/storage/DivinerLiveSymbol.php +++ b/src/applications/diviner/storage/DivinerLiveSymbol.php @@ -194,7 +194,7 @@ final class DivinerLiveSymbol extends DivinerDAO } public function attachExtends(array $extends) { - assert_instances_of($extends, __CLASS__); + assert_instances_of($extends, self::class); $this->extends = $extends; return $this; } @@ -204,7 +204,7 @@ final class DivinerLiveSymbol extends DivinerDAO } public function attachChildren(array $children) { - assert_instances_of($children, __CLASS__); + assert_instances_of($children, self::class); $this->children = $children; return $this; } diff --git a/src/applications/drydock/blueprint/DrydockBlueprintImplementation.php b/src/applications/drydock/blueprint/DrydockBlueprintImplementation.php index bfa039d39f..b110c825f9 100644 --- a/src/applications/drydock/blueprint/DrydockBlueprintImplementation.php +++ b/src/applications/drydock/blueprint/DrydockBlueprintImplementation.php @@ -327,7 +327,7 @@ abstract class DrydockBlueprintImplementation extends Phobject { public static function getAllBlueprintImplementations() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->execute(); } diff --git a/src/applications/drydock/logtype/DrydockLogType.php b/src/applications/drydock/logtype/DrydockLogType.php index 690ffc5670..1d57ff244d 100644 --- a/src/applications/drydock/logtype/DrydockLogType.php +++ b/src/applications/drydock/logtype/DrydockLogType.php @@ -34,7 +34,7 @@ abstract class DrydockLogType extends Phobject { final public static function getAllLogTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getLogTypeConstant') ->execute(); } diff --git a/src/applications/drydock/operation/DrydockRepositoryOperationType.php b/src/applications/drydock/operation/DrydockRepositoryOperationType.php index 32b562a303..b14d76ddd9 100644 --- a/src/applications/drydock/operation/DrydockRepositoryOperationType.php +++ b/src/applications/drydock/operation/DrydockRepositoryOperationType.php @@ -58,7 +58,7 @@ abstract class DrydockRepositoryOperationType extends Phobject { final public static function getAllOperationTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getOperationConstant') ->execute(); } diff --git a/src/applications/drydock/worker/DrydockLeaseUpdateWorker.php b/src/applications/drydock/worker/DrydockLeaseUpdateWorker.php index 12c3cf70be..ccb25d2e87 100644 --- a/src/applications/drydock/worker/DrydockLeaseUpdateWorker.php +++ b/src/applications/drydock/worker/DrydockLeaseUpdateWorker.php @@ -919,7 +919,7 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker { // activate it. if ($lease->getStatus() == DrydockLeaseStatus::STATUS_ACQUIRED) { $this->queueTask( - __CLASS__, + self::class, array( 'leasePHID' => $lease->getPHID(), ), @@ -1088,7 +1088,7 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker { $lease->awakenTasks(); $this->queueTask( - __CLASS__, + self::class, array( 'leasePHID' => $lease->getPHID(), ), diff --git a/src/applications/fact/chart/PhabricatorChartDataset.php b/src/applications/fact/chart/PhabricatorChartDataset.php index 2fb2c5e328..a0266053d6 100644 --- a/src/applications/fact/chart/PhabricatorChartDataset.php +++ b/src/applications/fact/chart/PhabricatorChartDataset.php @@ -26,7 +26,7 @@ abstract class PhabricatorChartDataset final public static function getAllDatasetTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getDatasetTypeKey') ->execute(); } diff --git a/src/applications/fact/chart/PhabricatorChartFunction.php b/src/applications/fact/chart/PhabricatorChartFunction.php index 9a03d7fb29..84163b2b7b 100644 --- a/src/applications/fact/chart/PhabricatorChartFunction.php +++ b/src/applications/fact/chart/PhabricatorChartFunction.php @@ -18,7 +18,7 @@ abstract class PhabricatorChartFunction */ final public static function getAllFunctions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getFunctionKey') ->execute(); } diff --git a/src/applications/fact/engine/PhabricatorChartEngine.php b/src/applications/fact/engine/PhabricatorChartEngine.php index 4fc751a3a3..0e9aa50abf 100644 --- a/src/applications/fact/engine/PhabricatorChartEngine.php +++ b/src/applications/fact/engine/PhabricatorChartEngine.php @@ -51,7 +51,7 @@ abstract class PhabricatorChartEngine */ final public static function getAllChartEngines() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getChartEngineKey') ->execute(); } diff --git a/src/applications/fact/engine/PhabricatorFactEngine.php b/src/applications/fact/engine/PhabricatorFactEngine.php index 0a79dac578..ee9b21935e 100644 --- a/src/applications/fact/engine/PhabricatorFactEngine.php +++ b/src/applications/fact/engine/PhabricatorFactEngine.php @@ -7,7 +7,7 @@ abstract class PhabricatorFactEngine extends Phobject { final public static function loadAllEngines() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->execute(); } diff --git a/src/applications/feed/story/PhabricatorFeedStory.php b/src/applications/feed/story/PhabricatorFeedStory.php index 5d61b9ab05..cf1563eb36 100644 --- a/src/applications/feed/story/PhabricatorFeedStory.php +++ b/src/applications/feed/story/PhabricatorFeedStory.php @@ -49,7 +49,7 @@ abstract class PhabricatorFeedStory try { $ok = class_exists($class) && - is_subclass_of($class, __CLASS__); + is_subclass_of($class, self::class); } catch (PhutilMissingSymbolException $ex) { $ok = false; } diff --git a/src/applications/files/document/PhabricatorDocumentEngine.php b/src/applications/files/document/PhabricatorDocumentEngine.php index 5d64a049af..c4fdaf3ac6 100644 --- a/src/applications/files/document/PhabricatorDocumentEngine.php +++ b/src/applications/files/document/PhabricatorDocumentEngine.php @@ -160,7 +160,7 @@ abstract class PhabricatorDocumentEngine final public static function getAllEngines() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getDocumentEngineKey') ->execute(); } diff --git a/src/applications/files/engine/PhabricatorFileStorageEngine.php b/src/applications/files/engine/PhabricatorFileStorageEngine.php index 06f53588f3..5dde28c410 100644 --- a/src/applications/files/engine/PhabricatorFileStorageEngine.php +++ b/src/applications/files/engine/PhabricatorFileStorageEngine.php @@ -227,7 +227,7 @@ abstract class PhabricatorFileStorageEngine extends Phobject { */ public static function loadAllEngines() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getEngineIdentifier') ->setSortMethod('getEnginePriority') ->execute(); diff --git a/src/applications/files/format/PhabricatorFileStorageFormat.php b/src/applications/files/format/PhabricatorFileStorageFormat.php index 2d24aa2207..a7043a072e 100644 --- a/src/applications/files/format/PhabricatorFileStorageFormat.php +++ b/src/applications/files/format/PhabricatorFileStorageFormat.php @@ -59,7 +59,7 @@ abstract class PhabricatorFileStorageFormat final public static function getAllFormats() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getStorageFormatKey') ->execute(); } diff --git a/src/applications/files/iconset/PhabricatorIconSet.php b/src/applications/files/iconset/PhabricatorIconSet.php index c31c3e11fc..64b730cfb1 100644 --- a/src/applications/files/iconset/PhabricatorIconSet.php +++ b/src/applications/files/iconset/PhabricatorIconSet.php @@ -64,7 +64,7 @@ abstract class PhabricatorIconSet final public static function getAllIconSets() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getIconSetKey') ->execute(); } diff --git a/src/applications/files/transform/PhabricatorFileTransform.php b/src/applications/files/transform/PhabricatorFileTransform.php index acad6d6d61..292640b1c9 100644 --- a/src/applications/files/transform/PhabricatorFileTransform.php +++ b/src/applications/files/transform/PhabricatorFileTransform.php @@ -53,7 +53,7 @@ abstract class PhabricatorFileTransform extends Phobject { public static function getAllTransforms() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setExpandMethod('generateTransforms') ->setUniqueMethod('getTransformKey') ->execute(); diff --git a/src/applications/guides/guidance/PhabricatorGuidanceEngineExtension.php b/src/applications/guides/guidance/PhabricatorGuidanceEngineExtension.php index b552b10b05..3f0e7f6939 100644 --- a/src/applications/guides/guidance/PhabricatorGuidanceEngineExtension.php +++ b/src/applications/guides/guidance/PhabricatorGuidanceEngineExtension.php @@ -31,7 +31,7 @@ abstract class PhabricatorGuidanceEngineExtension final public static function getAllExtensions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getExtensionKey') ->execute(); } diff --git a/src/applications/guides/module/PhabricatorGuideModule.php b/src/applications/guides/module/PhabricatorGuideModule.php index dcac14c0f5..db305c2959 100644 --- a/src/applications/guides/module/PhabricatorGuideModule.php +++ b/src/applications/guides/module/PhabricatorGuideModule.php @@ -10,7 +10,7 @@ abstract class PhabricatorGuideModule extends Phobject { final public static function getAllModules() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getModuleKey') ->setSortMethod('getModulePosition') ->execute(); @@ -18,7 +18,7 @@ abstract class PhabricatorGuideModule extends Phobject { final public static function getEnabledModules() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getModuleKey') ->setSortMethod('getModulePosition') ->setFilterMethod('getIsModuleEnabled') diff --git a/src/applications/harbormaster/artifact/HarbormasterArtifact.php b/src/applications/harbormaster/artifact/HarbormasterArtifact.php index 172469fccb..0433a30e61 100644 --- a/src/applications/harbormaster/artifact/HarbormasterArtifact.php +++ b/src/applications/harbormaster/artifact/HarbormasterArtifact.php @@ -52,7 +52,7 @@ abstract class HarbormasterArtifact extends Phobject { final public static function getAllArtifactTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getArtifactConstant') ->execute(); } diff --git a/src/applications/harbormaster/autoplan/HarbormasterBuildAutoplan.php b/src/applications/harbormaster/autoplan/HarbormasterBuildAutoplan.php index 6545fe92a4..5d0aec827a 100644 --- a/src/applications/harbormaster/autoplan/HarbormasterBuildAutoplan.php +++ b/src/applications/harbormaster/autoplan/HarbormasterBuildAutoplan.php @@ -11,7 +11,7 @@ abstract class HarbormasterBuildAutoplan extends Phobject { public static function getAllAutoplans() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getAutoplanPlanKey') ->execute(); } diff --git a/src/applications/harbormaster/integration/HarbormasterHookHandler.php b/src/applications/harbormaster/integration/HarbormasterHookHandler.php index 5b4aafa612..3899403fb3 100644 --- a/src/applications/harbormaster/integration/HarbormasterHookHandler.php +++ b/src/applications/harbormaster/integration/HarbormasterHookHandler.php @@ -5,7 +5,7 @@ abstract class HarbormasterHookHandler public static function getHandlers() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getName') ->execute(); } diff --git a/src/applications/harbormaster/step/HarbormasterBuildStepImplementation.php b/src/applications/harbormaster/step/HarbormasterBuildStepImplementation.php index cd3d4ee66f..bab665d4c7 100644 --- a/src/applications/harbormaster/step/HarbormasterBuildStepImplementation.php +++ b/src/applications/harbormaster/step/HarbormasterBuildStepImplementation.php @@ -19,7 +19,7 @@ abstract class HarbormasterBuildStepImplementation extends Phobject { public static function getImplementations() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->execute(); } diff --git a/src/applications/harbormaster/stepgroup/HarbormasterBuildStepGroup.php b/src/applications/harbormaster/stepgroup/HarbormasterBuildStepGroup.php index 5806861836..d5be11c78d 100644 --- a/src/applications/harbormaster/stepgroup/HarbormasterBuildStepGroup.php +++ b/src/applications/harbormaster/stepgroup/HarbormasterBuildStepGroup.php @@ -19,7 +19,7 @@ abstract class HarbormasterBuildStepGroup extends Phobject { final public static function getAllGroups() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getGroupKey') ->setSortMethod('getGroupOrder') ->execute(); diff --git a/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageTransaction.php b/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageTransaction.php index 0a09f11e7e..b4e8249537 100644 --- a/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageTransaction.php +++ b/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageTransaction.php @@ -45,7 +45,7 @@ abstract class HarbormasterBuildMessageTransaction final public static function getAllMessages() { $message_xactions = id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->execute(); return $message_xactions; diff --git a/src/applications/herald/action/HeraldAction.php b/src/applications/herald/action/HeraldAction.php index 1f699d2100..fe737ab2ac 100644 --- a/src/applications/herald/action/HeraldAction.php +++ b/src/applications/herald/action/HeraldAction.php @@ -151,7 +151,7 @@ abstract class HeraldAction extends Phobject { final public static function getAllActions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getActionConstant') ->execute(); } diff --git a/src/applications/herald/action/HeraldActionGroup.php b/src/applications/herald/action/HeraldActionGroup.php index ad4fecd6b6..ce0d411bb1 100644 --- a/src/applications/herald/action/HeraldActionGroup.php +++ b/src/applications/herald/action/HeraldActionGroup.php @@ -8,7 +8,7 @@ abstract class HeraldActionGroup extends HeraldGroup { final public static function getAllActionGroups() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getGroupKey') ->setSortMethod('getSortKey') ->execute(); diff --git a/src/applications/herald/adapter/HeraldAdapter.php b/src/applications/herald/adapter/HeraldAdapter.php index 26f00c887a..9188d15f4a 100644 --- a/src/applications/herald/adapter/HeraldAdapter.php +++ b/src/applications/herald/adapter/HeraldAdapter.php @@ -883,7 +883,7 @@ abstract class HeraldAdapter extends Phobject { public static function getAllAdapters() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getAdapterContentType') ->setSortMethod('getAdapterSortKey') ->execute(); diff --git a/src/applications/herald/field/HeraldField.php b/src/applications/herald/field/HeraldField.php index d822f15eed..8d1057a52c 100644 --- a/src/applications/herald/field/HeraldField.php +++ b/src/applications/herald/field/HeraldField.php @@ -243,7 +243,7 @@ abstract class HeraldField extends Phobject { final public static function getAllFields() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getFieldConstant') ->execute(); } diff --git a/src/applications/herald/field/HeraldFieldGroup.php b/src/applications/herald/field/HeraldFieldGroup.php index 9e13f17cb7..f7bc0307de 100644 --- a/src/applications/herald/field/HeraldFieldGroup.php +++ b/src/applications/herald/field/HeraldFieldGroup.php @@ -8,7 +8,7 @@ abstract class HeraldFieldGroup extends HeraldGroup { final public static function getAllFieldGroups() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getGroupKey') ->setSortMethod('getSortKey') ->execute(); diff --git a/src/applications/herald/state/HeraldStateReasons.php b/src/applications/herald/state/HeraldStateReasons.php index d85e8b713f..0569ee9070 100644 --- a/src/applications/herald/state/HeraldStateReasons.php +++ b/src/applications/herald/state/HeraldStateReasons.php @@ -6,7 +6,7 @@ abstract class HeraldStateReasons extends Phobject { final public static function getAllReasons() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->execute(); } diff --git a/src/applications/meta/panel/PhabricatorApplicationConfigurationPanel.php b/src/applications/meta/panel/PhabricatorApplicationConfigurationPanel.php index 5d62fd1a05..858de0e465 100644 --- a/src/applications/meta/panel/PhabricatorApplicationConfigurationPanel.php +++ b/src/applications/meta/panel/PhabricatorApplicationConfigurationPanel.php @@ -54,7 +54,7 @@ abstract class PhabricatorApplicationConfigurationPanel public static function loadAllPanels() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getPanelKey') ->execute(); } diff --git a/src/applications/metamta/adapter/PhabricatorMailAdapter.php b/src/applications/metamta/adapter/PhabricatorMailAdapter.php index 7a0f1bae31..4ab2f51a45 100644 --- a/src/applications/metamta/adapter/PhabricatorMailAdapter.php +++ b/src/applications/metamta/adapter/PhabricatorMailAdapter.php @@ -18,7 +18,7 @@ abstract class PhabricatorMailAdapter final public static function getAllAdapters() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getAdapterType') ->execute(); } diff --git a/src/applications/metamta/command/MetaMTAEmailTransactionCommand.php b/src/applications/metamta/command/MetaMTAEmailTransactionCommand.php index 511edb85d3..8516b3fd0e 100644 --- a/src/applications/metamta/command/MetaMTAEmailTransactionCommand.php +++ b/src/applications/metamta/command/MetaMTAEmailTransactionCommand.php @@ -61,7 +61,7 @@ abstract class MetaMTAEmailTransactionCommand extends Phobject { public static function getAllCommands() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setExpandMethod('getCommandObjects') ->setUniqueMethod('getCommand') ->execute(); @@ -81,7 +81,7 @@ abstract class MetaMTAEmailTransactionCommand extends Phobject { } public static function getCommandMap(array $commands) { - assert_instances_of($commands, __CLASS__); + assert_instances_of($commands, self::class); $map = array(); foreach ($commands as $command) { diff --git a/src/applications/metamta/engine/PhabricatorMailEngineExtension.php b/src/applications/metamta/engine/PhabricatorMailEngineExtension.php index 36675dda4a..c5afd64b85 100644 --- a/src/applications/metamta/engine/PhabricatorMailEngineExtension.php +++ b/src/applications/metamta/engine/PhabricatorMailEngineExtension.php @@ -35,7 +35,7 @@ abstract class PhabricatorMailEngineExtension final public static function getAllExtensions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getExtensionKey') ->execute(); } diff --git a/src/applications/metamta/message/PhabricatorMailExternalMessage.php b/src/applications/metamta/message/PhabricatorMailExternalMessage.php index 048b20ab54..0e573e9cff 100644 --- a/src/applications/metamta/message/PhabricatorMailExternalMessage.php +++ b/src/applications/metamta/message/PhabricatorMailExternalMessage.php @@ -9,7 +9,7 @@ abstract class PhabricatorMailExternalMessage final public static function getAllMessageTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getMessageType') ->execute(); } diff --git a/src/applications/metamta/stamp/PhabricatorMailStamp.php b/src/applications/metamta/stamp/PhabricatorMailStamp.php index 9b425a4bdf..ce1ee6a4a3 100644 --- a/src/applications/metamta/stamp/PhabricatorMailStamp.php +++ b/src/applications/metamta/stamp/PhabricatorMailStamp.php @@ -62,7 +62,7 @@ abstract class PhabricatorMailStamp final public static function getAllStamps() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getStampType') ->execute(); } diff --git a/src/applications/nuance/command/NuanceCommandImplementation.php b/src/applications/nuance/command/NuanceCommandImplementation.php index 2b47e40654..0cb913ae01 100644 --- a/src/applications/nuance/command/NuanceCommandImplementation.php +++ b/src/applications/nuance/command/NuanceCommandImplementation.php @@ -91,7 +91,7 @@ abstract class NuanceCommandImplementation final public static function getAllCommands() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getCommandKey') ->execute(); } diff --git a/src/applications/nuance/item/NuanceItemType.php b/src/applications/nuance/item/NuanceItemType.php index 245e11187d..1c1900ab2d 100644 --- a/src/applications/nuance/item/NuanceItemType.php +++ b/src/applications/nuance/item/NuanceItemType.php @@ -79,7 +79,7 @@ abstract class NuanceItemType final public static function getAllItemTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getItemTypeConstant') ->execute(); } diff --git a/src/applications/nuance/source/NuanceSourceDefinition.php b/src/applications/nuance/source/NuanceSourceDefinition.php index acab0c7b66..d4bc194fc0 100644 --- a/src/applications/nuance/source/NuanceSourceDefinition.php +++ b/src/applications/nuance/source/NuanceSourceDefinition.php @@ -38,7 +38,7 @@ abstract class NuanceSourceDefinition extends Phobject { public static function getAllDefinitions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getSourceTypeConstant') ->execute(); } diff --git a/src/applications/passphrase/credentialtype/PassphraseCredentialType.php b/src/applications/passphrase/credentialtype/PassphraseCredentialType.php index 58c09fac00..a39f34dced 100644 --- a/src/applications/passphrase/credentialtype/PassphraseCredentialType.php +++ b/src/applications/passphrase/credentialtype/PassphraseCredentialType.php @@ -17,7 +17,7 @@ abstract class PassphraseCredentialType extends Phobject { public static function getAllTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getCredentialType') ->execute(); } diff --git a/src/applications/people/cache/PhabricatorUserCacheType.php b/src/applications/people/cache/PhabricatorUserCacheType.php index 27e965fb43..28f8ee82b6 100644 --- a/src/applications/people/cache/PhabricatorUserCacheType.php +++ b/src/applications/people/cache/PhabricatorUserCacheType.php @@ -40,7 +40,7 @@ abstract class PhabricatorUserCacheType extends Phobject { public static function getAllCacheTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getUserCacheType') ->execute(); } diff --git a/src/applications/people/userlog/PhabricatorUserLogType.php b/src/applications/people/userlog/PhabricatorUserLogType.php index af14b88f80..6b5fa05719 100644 --- a/src/applications/people/userlog/PhabricatorUserLogType.php +++ b/src/applications/people/userlog/PhabricatorUserLogType.php @@ -11,7 +11,7 @@ abstract class PhabricatorUserLogType final public static function getAllLogTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getLogTypeKey') ->execute(); } diff --git a/src/applications/phid/handle/pool/PhabricatorHandleList.php b/src/applications/phid/handle/pool/PhabricatorHandleList.php index 1418a107c0..be9e04fa49 100644 --- a/src/applications/phid/handle/pool/PhabricatorHandleList.php +++ b/src/applications/phid/handle/pool/PhabricatorHandleList.php @@ -191,7 +191,7 @@ final class PhabricatorHandleList pht( 'Trying to mutate a %s, but this is not permitted; '. 'handle lists are immutable.', - __CLASS__)); + self::class)); } diff --git a/src/applications/phid/type/PhabricatorPHIDType.php b/src/applications/phid/type/PhabricatorPHIDType.php index 188fbbb9b8..c2a582994a 100644 --- a/src/applications/phid/type/PhabricatorPHIDType.php +++ b/src/applications/phid/type/PhabricatorPHIDType.php @@ -10,7 +10,7 @@ abstract class PhabricatorPHIDType extends Phobject { pht( '%s class "%s" has an invalid %s property. PHID '. 'constants must be a four character uppercase string.', - __CLASS__, + self::class, get_class($this), 'TYPECONST')); } @@ -163,7 +163,7 @@ abstract class PhabricatorPHIDType extends Phobject { private static function newClassMapQuery() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getTypeConstant'); } diff --git a/src/applications/phrequent/storage/PhrequentTimeBlock.php b/src/applications/phrequent/storage/PhrequentTimeBlock.php index 869b6d34fb..843e149788 100644 --- a/src/applications/phrequent/storage/PhrequentTimeBlock.php +++ b/src/applications/phrequent/storage/PhrequentTimeBlock.php @@ -72,7 +72,7 @@ final class PhrequentTimeBlock extends Phobject { // Now, figure out how much time was actually spent working on the // object. - usort($timeline, array(__CLASS__, 'sortTimeline')); + usort($timeline, array(self::class, 'sortTimeline')); $stack = array(); $depth = null; diff --git a/src/applications/policy/capability/PhabricatorPolicyCapability.php b/src/applications/policy/capability/PhabricatorPolicyCapability.php index 7792ee5041..deb65f8067 100644 --- a/src/applications/policy/capability/PhabricatorPolicyCapability.php +++ b/src/applications/policy/capability/PhabricatorPolicyCapability.php @@ -59,7 +59,7 @@ abstract class PhabricatorPolicyCapability extends Phobject { final public static function getCapabilityMap() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getCapabilityKey') ->execute(); } diff --git a/src/applications/policy/codex/PhabricatorPolicyCodex.php b/src/applications/policy/codex/PhabricatorPolicyCodex.php index 9bccb842bb..25ab2998dd 100644 --- a/src/applications/policy/codex/PhabricatorPolicyCodex.php +++ b/src/applications/policy/codex/PhabricatorPolicyCodex.php @@ -104,7 +104,7 @@ abstract class PhabricatorPolicyCodex get_class($object), 'PhabricatorPolicyCodexInterface', 'newPolicyCodex()', - __CLASS__)); + self::class)); } $codex diff --git a/src/applications/project/order/PhabricatorProjectColumnOrder.php b/src/applications/project/order/PhabricatorProjectColumnOrder.php index 430d9ef472..f93aa557fa 100644 --- a/src/applications/project/order/PhabricatorProjectColumnOrder.php +++ b/src/applications/project/order/PhabricatorProjectColumnOrder.php @@ -20,7 +20,7 @@ abstract class PhabricatorProjectColumnOrder final public static function getAllOrders() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getColumnOrderKey') ->setSortMethod('getMenuOrder') ->execute(); diff --git a/src/applications/project/trigger/PhabricatorProjectTriggerRule.php b/src/applications/project/trigger/PhabricatorProjectTriggerRule.php index 58c7cd1f1a..ed0f979d71 100644 --- a/src/applications/project/trigger/PhabricatorProjectTriggerRule.php +++ b/src/applications/project/trigger/PhabricatorProjectTriggerRule.php @@ -15,7 +15,7 @@ abstract class PhabricatorProjectTriggerRule final public static function getAllTriggerRules() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getTriggerType') ->execute(); } diff --git a/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php b/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php index 101f22fa59..f11e0b7a97 100644 --- a/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php +++ b/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php @@ -37,7 +37,7 @@ final class PhabricatorRepositoryPullLocalDaemon */ protected function run() { $argv = $this->getArgv(); - array_unshift($argv, __CLASS__); + array_unshift($argv, self::class); $args = new PhutilArgumentParser($argv); $args->parse( array( diff --git a/src/applications/repository/graphcache/PhabricatorRepositoryGraphCache.php b/src/applications/repository/graphcache/PhabricatorRepositoryGraphCache.php index f42ef9c6c1..e725211a8e 100644 --- a/src/applications/repository/graphcache/PhabricatorRepositoryGraphCache.php +++ b/src/applications/repository/graphcache/PhabricatorRepositoryGraphCache.php @@ -110,7 +110,7 @@ final class PhabricatorRepositoryGraphCache extends Phobject { // Sanity check so we can survive and recover from bad data. if (isset($seen[$commit_id])) { - phlog(pht('Unexpected infinite loop in %s!', __CLASS__)); + phlog(pht('Unexpected infinite loop in %s!', self::class)); return false; } else { $seen[$commit_id] = true; diff --git a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php index 79d0ac628a..1897b974a4 100644 --- a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php +++ b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php @@ -685,7 +685,7 @@ abstract class PhabricatorApplicationSearchEngine extends Phobject { */ public static function getAllEngines() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->execute(); } diff --git a/src/applications/search/engineextension/PhabricatorDatasourceEngineExtension.php b/src/applications/search/engineextension/PhabricatorDatasourceEngineExtension.php index c568e9e14d..95dc4eb536 100644 --- a/src/applications/search/engineextension/PhabricatorDatasourceEngineExtension.php +++ b/src/applications/search/engineextension/PhabricatorDatasourceEngineExtension.php @@ -28,7 +28,7 @@ abstract class PhabricatorDatasourceEngineExtension extends Phobject { final public static function getAllExtensions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->execute(); } diff --git a/src/applications/search/engineextension/PhabricatorHovercardEngineExtension.php b/src/applications/search/engineextension/PhabricatorHovercardEngineExtension.php index 060441c985..c846907c89 100644 --- a/src/applications/search/engineextension/PhabricatorHovercardEngineExtension.php +++ b/src/applications/search/engineextension/PhabricatorHovercardEngineExtension.php @@ -39,7 +39,7 @@ abstract class PhabricatorHovercardEngineExtension extends Phobject { final public static function getAllExtensions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getExtensionKey') ->setSortMethod('getExtensionOrder') ->execute(); diff --git a/src/applications/search/engineextension/PhabricatorSearchEngineExtension.php b/src/applications/search/engineextension/PhabricatorSearchEngineExtension.php index be44db38e0..81e0ac90f1 100644 --- a/src/applications/search/engineextension/PhabricatorSearchEngineExtension.php +++ b/src/applications/search/engineextension/PhabricatorSearchEngineExtension.php @@ -110,7 +110,7 @@ abstract class PhabricatorSearchEngineExtension extends Phobject { */ final public static function getAllExtensions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getExtensionKey') ->setSortMethod('getExtensionOrder') ->execute(); diff --git a/src/applications/search/index/PhabricatorFulltextEngineExtension.php b/src/applications/search/index/PhabricatorFulltextEngineExtension.php index e8761b2e01..92af89cebb 100644 --- a/src/applications/search/index/PhabricatorFulltextEngineExtension.php +++ b/src/applications/search/index/PhabricatorFulltextEngineExtension.php @@ -34,7 +34,7 @@ abstract class PhabricatorFulltextEngineExtension extends Phobject { final public static function getAllExtensions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getExtensionKey') ->execute(); } diff --git a/src/applications/search/index/PhabricatorIndexEngineExtension.php b/src/applications/search/index/PhabricatorIndexEngineExtension.php index aaf22d055b..4e0f11724d 100644 --- a/src/applications/search/index/PhabricatorIndexEngineExtension.php +++ b/src/applications/search/index/PhabricatorIndexEngineExtension.php @@ -36,7 +36,7 @@ abstract class PhabricatorIndexEngineExtension extends Phobject { final public static function getAllExtensions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getExtensionKey') ->execute(); } diff --git a/src/applications/search/menuitem/PhabricatorProfileMenuItem.php b/src/applications/search/menuitem/PhabricatorProfileMenuItem.php index 2dc0270d24..b2204b047f 100644 --- a/src/applications/search/menuitem/PhabricatorProfileMenuItem.php +++ b/src/applications/search/menuitem/PhabricatorProfileMenuItem.php @@ -61,7 +61,7 @@ abstract class PhabricatorProfileMenuItem extends Phobject { final public static function getAllMenuItems() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getMenuItemKey') ->execute(); } diff --git a/src/applications/search/relationship/PhabricatorObjectRelationship.php b/src/applications/search/relationship/PhabricatorObjectRelationship.php index 0827c1728c..6a30a5a2e8 100644 --- a/src/applications/search/relationship/PhabricatorObjectRelationship.php +++ b/src/applications/search/relationship/PhabricatorObjectRelationship.php @@ -93,7 +93,7 @@ abstract class PhabricatorObjectRelationship extends Phobject { final public static function getAllRelationships() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getRelationshipConstant') ->execute(); } diff --git a/src/applications/search/worker/PhabricatorRebuildIndexesWorker.php b/src/applications/search/worker/PhabricatorRebuildIndexesWorker.php index 7d5cc64b0b..510953296a 100644 --- a/src/applications/search/worker/PhabricatorRebuildIndexesWorker.php +++ b/src/applications/search/worker/PhabricatorRebuildIndexesWorker.php @@ -4,7 +4,7 @@ final class PhabricatorRebuildIndexesWorker extends PhabricatorWorker { public static function rebuildObjectsWithQuery($query_class) { parent::scheduleTask( - __CLASS__, + self::class, array( 'queryClass' => $query_class, ), diff --git a/src/applications/search/worker/PhabricatorSearchWorker.php b/src/applications/search/worker/PhabricatorSearchWorker.php index 31c68d45c8..ca7182d035 100644 --- a/src/applications/search/worker/PhabricatorSearchWorker.php +++ b/src/applications/search/worker/PhabricatorSearchWorker.php @@ -12,7 +12,7 @@ final class PhabricatorSearchWorker extends PhabricatorWorker { } parent::scheduleTask( - __CLASS__, + self::class, array( 'documentPHID' => $phid, 'parameters' => $parameters, diff --git a/src/applications/settings/panel/PhabricatorSettingsPanel.php b/src/applications/settings/panel/PhabricatorSettingsPanel.php index 483cabdc48..4b1706c6d7 100644 --- a/src/applications/settings/panel/PhabricatorSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorSettingsPanel.php @@ -87,7 +87,7 @@ abstract class PhabricatorSettingsPanel extends Phobject { final public static function getAllPanels() { $panels = id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getPanelKey') ->execute(); return msortv($panels, 'getPanelOrderVector'); diff --git a/src/applications/settings/panelgroup/PhabricatorSettingsPanelGroup.php b/src/applications/settings/panelgroup/PhabricatorSettingsPanelGroup.php index e828fa3b70..f73ae058e8 100644 --- a/src/applications/settings/panelgroup/PhabricatorSettingsPanelGroup.php +++ b/src/applications/settings/panelgroup/PhabricatorSettingsPanelGroup.php @@ -22,7 +22,7 @@ abstract class PhabricatorSettingsPanelGroup extends Phobject { final public static function getAllPanelGroups() { $groups = id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getPanelGroupKey') ->execute(); diff --git a/src/applications/settings/setting/PhabricatorSetting.php b/src/applications/settings/setting/PhabricatorSetting.php index f402001c9d..e7176ebd78 100644 --- a/src/applications/settings/setting/PhabricatorSetting.php +++ b/src/applications/settings/setting/PhabricatorSetting.php @@ -50,7 +50,7 @@ abstract class PhabricatorSetting extends Phobject { public static function getAllSettings() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getSettingKey') ->execute(); } diff --git a/src/applications/system/codex/PhabricatorDestructibleCodex.php b/src/applications/system/codex/PhabricatorDestructibleCodex.php index 1c37907c34..b4701dd9f9 100644 --- a/src/applications/system/codex/PhabricatorDestructibleCodex.php +++ b/src/applications/system/codex/PhabricatorDestructibleCodex.php @@ -53,7 +53,7 @@ abstract class PhabricatorDestructibleCodex get_class($object), 'PhabricatorDestructibleCodexInterface', 'newDestructibleCodex()', - __CLASS__)); + self::class)); } $codex diff --git a/src/applications/system/engine/PhabricatorBeforeDestructionEngineExtension.php b/src/applications/system/engine/PhabricatorBeforeDestructionEngineExtension.php index 6e6059efa6..2239a51a25 100644 --- a/src/applications/system/engine/PhabricatorBeforeDestructionEngineExtension.php +++ b/src/applications/system/engine/PhabricatorBeforeDestructionEngineExtension.php @@ -75,7 +75,7 @@ abstract class PhabricatorBeforeDestructionEngineExtension extends Phobject { final public static function getAllExtensions(): array { $map = new PhutilClassMapQuery(); return $map - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getExtensionKey') ->execute(); } diff --git a/src/applications/system/engine/PhabricatorCacheEngineExtension.php b/src/applications/system/engine/PhabricatorCacheEngineExtension.php index 3759f1057e..61e38acb77 100644 --- a/src/applications/system/engine/PhabricatorCacheEngineExtension.php +++ b/src/applications/system/engine/PhabricatorCacheEngineExtension.php @@ -22,7 +22,7 @@ abstract class PhabricatorCacheEngineExtension extends Phobject { final public static function getAllExtensions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getExtensionKey') ->execute(); } diff --git a/src/applications/system/engine/PhabricatorDestructionEngineExtension.php b/src/applications/system/engine/PhabricatorDestructionEngineExtension.php index 17c5e9e5cb..56c9f18412 100644 --- a/src/applications/system/engine/PhabricatorDestructionEngineExtension.php +++ b/src/applications/system/engine/PhabricatorDestructionEngineExtension.php @@ -28,7 +28,7 @@ abstract class PhabricatorDestructionEngineExtension extends Phobject { final public static function getAllExtensions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getExtensionKey') ->execute(); } diff --git a/src/applications/transactions/editengine/PhabricatorEditEngine.php b/src/applications/transactions/editengine/PhabricatorEditEngine.php index 1aee12a53a..88206c9748 100644 --- a/src/applications/transactions/editengine/PhabricatorEditEngine.php +++ b/src/applications/transactions/editengine/PhabricatorEditEngine.php @@ -2369,7 +2369,7 @@ abstract class PhabricatorEditEngine final public static function getAllEditEngines() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getEngineKey') ->execute(); } diff --git a/src/applications/transactions/engineextension/PhabricatorEditEngineExtension.php b/src/applications/transactions/engineextension/PhabricatorEditEngineExtension.php index f2f22b158b..59852309a8 100644 --- a/src/applications/transactions/engineextension/PhabricatorEditEngineExtension.php +++ b/src/applications/transactions/engineextension/PhabricatorEditEngineExtension.php @@ -38,7 +38,7 @@ abstract class PhabricatorEditEngineExtension extends Phobject { final public static function getAllExtensions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getExtensionKey') ->setSortMethod('getExtensionPriority') ->execute(); diff --git a/src/applications/transactions/engineextension/PhabricatorEditorExtension.php b/src/applications/transactions/engineextension/PhabricatorEditorExtension.php index 643ecd0350..85df877b86 100644 --- a/src/applications/transactions/engineextension/PhabricatorEditorExtension.php +++ b/src/applications/transactions/engineextension/PhabricatorEditorExtension.php @@ -38,7 +38,7 @@ abstract class PhabricatorEditorExtension final public static function getAllExtensions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getExtensionKey') ->execute(); } diff --git a/src/applications/transactions/query/PhabricatorApplicationTransactionQuery.php b/src/applications/transactions/query/PhabricatorApplicationTransactionQuery.php index 64e94947ac..4cab10e51d 100644 --- a/src/applications/transactions/query/PhabricatorApplicationTransactionQuery.php +++ b/src/applications/transactions/query/PhabricatorApplicationTransactionQuery.php @@ -23,7 +23,7 @@ abstract class PhabricatorApplicationTransactionQuery $target_class = get_class($xaction); $queries = id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->execute(); foreach ($queries as $query) { $query_xaction = $query->getTemplateApplicationTransaction(); diff --git a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php index 25f20cda17..6bc92e0c3b 100644 --- a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php +++ b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php @@ -1675,7 +1675,7 @@ abstract class PhabricatorApplicationTransaction } public function attachTransactionGroup(array $group) { - assert_instances_of($group, __CLASS__); + assert_instances_of($group, self::class); $this->transactionGroup = $group; return $this; } diff --git a/src/infrastructure/contentsource/PhabricatorContentSource.php b/src/infrastructure/contentsource/PhabricatorContentSource.php index fcefa98c50..17ba18948f 100644 --- a/src/infrastructure/contentsource/PhabricatorContentSource.php +++ b/src/infrastructure/contentsource/PhabricatorContentSource.php @@ -14,7 +14,7 @@ abstract class PhabricatorContentSource extends Phobject { final public static function getAllContentSources() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getSourceTypeConstant') ->execute(); } diff --git a/src/infrastructure/customfield/field/PhabricatorCustomField.php b/src/infrastructure/customfield/field/PhabricatorCustomField.php index 7e2b3c74ce..cbc3219943 100644 --- a/src/infrastructure/customfield/field/PhabricatorCustomField.php +++ b/src/infrastructure/customfield/field/PhabricatorCustomField.php @@ -1651,7 +1651,7 @@ abstract class PhabricatorCustomField extends Phobject { PhabricatorCustomFieldInterface $object, $role, array $fields) { - assert_instances_of($fields, __CLASS__); + assert_instances_of($fields, self::class); // We only apply subtype adjustment for some roles. For example, when // writing Herald rules or building a Search interface, we always want to diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php index 8ed6e0f42a..d7a5f6deee 100644 --- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php +++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php @@ -28,7 +28,7 @@ abstract class PhabricatorStandardCustomField $builtin = false) { $types = id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getFieldType') ->execute(); diff --git a/src/infrastructure/daemon/PhutilDaemon.php b/src/infrastructure/daemon/PhutilDaemon.php index bdd29a9ade..c7b17ee557 100644 --- a/src/infrastructure/daemon/PhutilDaemon.php +++ b/src/infrastructure/daemon/PhutilDaemon.php @@ -85,7 +85,7 @@ abstract class PhutilDaemon extends Phobject { if (!$router->getHandler($handler_key)) { $handler = new PhutilCallbackSignalHandler( SIGTERM, - __CLASS__.'::onTermSignal'); + self::class.'::onTermSignal'); $router->installHandler($handler_key, $handler); } diff --git a/src/infrastructure/daemon/PhutilDaemonOverseerModule.php b/src/infrastructure/daemon/PhutilDaemonOverseerModule.php index 9c746d17a1..98c4c35ae5 100644 --- a/src/infrastructure/daemon/PhutilDaemonOverseerModule.php +++ b/src/infrastructure/daemon/PhutilDaemonOverseerModule.php @@ -32,7 +32,7 @@ abstract class PhutilDaemonOverseerModule extends Phobject { public static function getAllModules() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->execute(); } diff --git a/src/infrastructure/daemon/garbagecollector/PhabricatorGarbageCollector.php b/src/infrastructure/daemon/garbagecollector/PhabricatorGarbageCollector.php index 9cf1c22527..e344017314 100644 --- a/src/infrastructure/daemon/garbagecollector/PhabricatorGarbageCollector.php +++ b/src/infrastructure/daemon/garbagecollector/PhabricatorGarbageCollector.php @@ -169,7 +169,7 @@ abstract class PhabricatorGarbageCollector extends Phobject { */ final public static function getAllCollectors() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getCollectorConstant') ->execute(); } diff --git a/src/infrastructure/daemon/workers/bulk/PhabricatorWorkerBulkJobType.php b/src/infrastructure/daemon/workers/bulk/PhabricatorWorkerBulkJobType.php index 7854730bea..37f30bca67 100644 --- a/src/infrastructure/daemon/workers/bulk/PhabricatorWorkerBulkJobType.php +++ b/src/infrastructure/daemon/workers/bulk/PhabricatorWorkerBulkJobType.php @@ -20,7 +20,7 @@ abstract class PhabricatorWorkerBulkJobType extends Phobject { final public static function getAllJobTypes() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getBulkJobTypeKey') ->execute(); } diff --git a/src/infrastructure/edges/type/PhabricatorEdgeType.php b/src/infrastructure/edges/type/PhabricatorEdgeType.php index 83c59f8f1f..06678070c4 100644 --- a/src/infrastructure/edges/type/PhabricatorEdgeType.php +++ b/src/infrastructure/edges/type/PhabricatorEdgeType.php @@ -19,7 +19,7 @@ abstract class PhabricatorEdgeType extends Phobject { pht( '%s class "%s" has an invalid %s property. '. 'Edge constants must be positive integers.', - __CLASS__, + self::class, get_class($this), 'EDGECONST')); } @@ -159,7 +159,7 @@ abstract class PhabricatorEdgeType extends Phobject { if ($type_map === null) { $types = id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getEdgeConstant') ->execute(); diff --git a/src/infrastructure/env/PhabricatorConfigStackSource.php b/src/infrastructure/env/PhabricatorConfigStackSource.php index a8c5113f15..4c64553936 100644 --- a/src/infrastructure/env/PhabricatorConfigStackSource.php +++ b/src/infrastructure/env/PhabricatorConfigStackSource.php @@ -19,7 +19,7 @@ final class PhabricatorConfigStackSource public function popSource() { if (empty($this->stack)) { - throw new Exception(pht('Popping an empty %s!', __CLASS__)); + throw new Exception(pht('Popping an empty %s!', self::class)); } return array_shift($this->stack); } diff --git a/src/infrastructure/events/PhabricatorExampleEventListener.php b/src/infrastructure/events/PhabricatorExampleEventListener.php index 3e3353f376..e1dce5e2df 100644 --- a/src/infrastructure/events/PhabricatorExampleEventListener.php +++ b/src/infrastructure/events/PhabricatorExampleEventListener.php @@ -24,7 +24,7 @@ final class PhabricatorExampleEventListener extends PhabricatorEventListener { "%s\n", pht( '%s got test event at %d', - __CLASS__, + self::class, $event->getValue('time'))); } diff --git a/src/infrastructure/export/engine/PhabricatorExportEngineExtension.php b/src/infrastructure/export/engine/PhabricatorExportEngineExtension.php index 01d4471ef2..2cd8c9153e 100644 --- a/src/infrastructure/export/engine/PhabricatorExportEngineExtension.php +++ b/src/infrastructure/export/engine/PhabricatorExportEngineExtension.php @@ -23,7 +23,7 @@ abstract class PhabricatorExportEngineExtension extends Phobject { final public static function getAllExtensions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getExtensionKey') ->execute(); } diff --git a/src/infrastructure/export/format/PhabricatorExportFormat.php b/src/infrastructure/export/format/PhabricatorExportFormat.php index 4566814b9d..410ca0a6e4 100644 --- a/src/infrastructure/export/format/PhabricatorExportFormat.php +++ b/src/infrastructure/export/format/PhabricatorExportFormat.php @@ -45,7 +45,7 @@ abstract class PhabricatorExportFormat final public static function getAllExportFormats() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getExportFormatKey') ->execute(); } diff --git a/src/infrastructure/markup/markuprule/PhutilRemarkupHyperlinkEngineExtension.php b/src/infrastructure/markup/markuprule/PhutilRemarkupHyperlinkEngineExtension.php index 681ec46a09..8464b7b349 100644 --- a/src/infrastructure/markup/markuprule/PhutilRemarkupHyperlinkEngineExtension.php +++ b/src/infrastructure/markup/markuprule/PhutilRemarkupHyperlinkEngineExtension.php @@ -11,7 +11,7 @@ abstract class PhutilRemarkupHyperlinkEngineExtension final public static function getAllLinkEngines() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getHyperlinkEngineKey') ->execute(); } diff --git a/src/infrastructure/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php b/src/infrastructure/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php index 0f9c0159f6..c290780882 100644 --- a/src/infrastructure/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php +++ b/src/infrastructure/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php @@ -250,7 +250,7 @@ final class AphrontMySQLiDatabaseConnection } public static function resolveAsyncQueries(array $conns, array $asyncs) { - assert_instances_of($conns, __CLASS__); + assert_instances_of($conns, self::class); assert_instances_of($asyncs, 'mysqli'); $read = $error = $reject = array(); diff --git a/src/infrastructure/storage/patch/PhabricatorSQLPatchList.php b/src/infrastructure/storage/patch/PhabricatorSQLPatchList.php index 765ddae512..66597d1c47 100644 --- a/src/infrastructure/storage/patch/PhabricatorSQLPatchList.php +++ b/src/infrastructure/storage/patch/PhabricatorSQLPatchList.php @@ -48,7 +48,7 @@ abstract class PhabricatorSQLPatchList extends Phobject { final public static function buildAllPatches() { $patch_lists = id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getNamespace') ->execute(); @@ -70,7 +70,7 @@ abstract class PhabricatorSQLPatchList extends Phobject { throw new Exception( pht( "%s '%s' has a patch '%s' which is not an array.", - __CLASS__, + self::class, get_class($patch_list), $key)); } @@ -90,7 +90,7 @@ abstract class PhabricatorSQLPatchList extends Phobject { pht( "%s '%s' has a patch, '%s', with an unknown property, '%s'.". "Patches must have only valid keys: %s.", - __CLASS__, + self::class, get_class($patch_list), $key, $pkey, @@ -103,7 +103,7 @@ abstract class PhabricatorSQLPatchList extends Phobject { pht( "%s '%s' has a patch with a numeric key, '%s'. ". "Patches must use string keys.", - __CLASS__, + self::class, get_class($patch_list), $key)); } @@ -113,7 +113,7 @@ abstract class PhabricatorSQLPatchList extends Phobject { pht( "%s '%s' has a patch with a colon in the key name, '%s'. ". "Patch keys may not contain colons.", - __CLASS__, + self::class, get_class($patch_list), $key)); } @@ -126,7 +126,7 @@ abstract class PhabricatorSQLPatchList extends Phobject { pht( "%s '%s' has a patch '%s' which duplicates an ". "existing patch key.", - __CLASS__, + self::class, get_class($patch_list), $key)); } diff --git a/src/infrastructure/syntax/PhabricatorSyntaxStyle.php b/src/infrastructure/syntax/PhabricatorSyntaxStyle.php index 3f75f5c639..358fdf3804 100644 --- a/src/infrastructure/syntax/PhabricatorSyntaxStyle.php +++ b/src/infrastructure/syntax/PhabricatorSyntaxStyle.php @@ -21,7 +21,7 @@ abstract class PhabricatorSyntaxStyle extends Phobject { public static function getAllStyles() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getSyntaxStyleKey') ->setSortMethod('getStyleName') ->execute(); diff --git a/src/infrastructure/util/password/PhabricatorPasswordHasher.php b/src/infrastructure/util/password/PhabricatorPasswordHasher.php index ac7c9963e9..d44454f1e4 100644 --- a/src/infrastructure/util/password/PhabricatorPasswordHasher.php +++ b/src/infrastructure/util/password/PhabricatorPasswordHasher.php @@ -213,7 +213,7 @@ abstract class PhabricatorPasswordHasher extends Phobject { */ public static function getAllHashers() { $objects = id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getHashName') ->execute(); diff --git a/src/view/AphrontDialogView.php b/src/view/AphrontDialogView.php index d0692213a6..3cd1dcea41 100644 --- a/src/view/AphrontDialogView.php +++ b/src/view/AphrontDialogView.php @@ -322,7 +322,7 @@ final class AphrontDialogView pht( 'You must call %s when rendering an %s.', 'setViewer()', - __CLASS__)); + self::class)); } $classes = array(); diff --git a/src/view/extension/PHUICurtainExtension.php b/src/view/extension/PHUICurtainExtension.php index 7f7693cbac..37499cdd2f 100644 --- a/src/view/extension/PHUICurtainExtension.php +++ b/src/view/extension/PHUICurtainExtension.php @@ -36,7 +36,7 @@ abstract class PHUICurtainExtension extends Phobject { final public static function getAllExtensions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getExtensionKey') ->execute(); } diff --git a/src/view/form/AphrontFormView.php b/src/view/form/AphrontFormView.php index ef5cb8e864..1f86d85cc9 100644 --- a/src/view/form/AphrontFormView.php +++ b/src/view/form/AphrontFormView.php @@ -138,7 +138,7 @@ final class AphrontFormView extends AphrontView { throw new Exception( pht( 'You must pass the user to %s.', - __CLASS__)); + self::class)); } $sigils = $this->sigils; diff --git a/src/view/page/PhabricatorStandardPageView.php b/src/view/page/PhabricatorStandardPageView.php index ac87bbd729..0ca29636c2 100644 --- a/src/view/page/PhabricatorStandardPageView.php +++ b/src/view/page/PhabricatorStandardPageView.php @@ -221,7 +221,7 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView pht( 'You must set the %s to render a %s.', 'Request', - __CLASS__)); + self::class)); } $console = $this->getConsole(); diff --git a/src/view/page/menu/PhabricatorMainMenuBarExtension.php b/src/view/page/menu/PhabricatorMainMenuBarExtension.php index e66b1f2c7d..24af6d555c 100644 --- a/src/view/page/menu/PhabricatorMainMenuBarExtension.php +++ b/src/view/page/menu/PhabricatorMainMenuBarExtension.php @@ -86,7 +86,7 @@ abstract class PhabricatorMainMenuBarExtension extends Phobject { final public static function getAllExtensions() { return id(new PhutilClassMapQuery()) - ->setAncestorClass(__CLASS__) + ->setAncestorClass(self::class) ->setUniqueMethod('getExtensionKey') ->setSortMethod('getExtensionOrder') ->execute(); diff --git a/support/startup/PhabricatorStartup.php b/support/startup/PhabricatorStartup.php index 9d1f72b390..63f7531c8b 100644 --- a/support/startup/PhabricatorStartup.php +++ b/support/startup/PhabricatorStartup.php @@ -128,7 +128,7 @@ final class PhabricatorStartup { // NOTE: This protects us against multiple calls to didStartup() in the // same request, but also against repeated requests to the same // interpreter state, which we may implement in the future. - register_shutdown_function(array(__CLASS__, 'didShutdown')); + register_shutdown_function(array(self::class, 'didShutdown')); $registered = true; } @@ -264,7 +264,7 @@ final class PhabricatorStartup { static $initialized = false; if (!$initialized) { declare(ticks=1); - register_tick_function(array(__CLASS__, 'onDebugTick')); + register_tick_function(array(self::class, 'onDebugTick')); $initialized = true; } }