mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-31 08:58:20 +01:00
Linter fixes
Summary: Apply various minor linter fixes. Test Plan: `arc lint` Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D13109
This commit is contained in:
parent
2d15c3c062
commit
bf81fda036
16 changed files with 53 additions and 53 deletions
|
@ -86,7 +86,7 @@ abstract class PhabricatorAphlictManagementWorkflow
|
|||
exit(1);
|
||||
}
|
||||
|
||||
protected final function setDebug($debug) {
|
||||
final protected function setDebug($debug) {
|
||||
$this->debug = $debug;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
|||
|
||||
/* -( Application Information )-------------------------------------------- */
|
||||
|
||||
public abstract function getName();
|
||||
abstract public function getName();
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('%s Application', $this->getName());
|
||||
|
|
|
@ -90,7 +90,7 @@ abstract class ConduitAPIMethod
|
|||
return $this->execute($request);
|
||||
}
|
||||
|
||||
public abstract function getAPIMethodName();
|
||||
abstract public function getAPIMethodName();
|
||||
|
||||
/**
|
||||
* Return a key which sorts methods by application name, then method status,
|
||||
|
|
|
@ -5,7 +5,7 @@ abstract class PhabricatorDaemonManagementWorkflow
|
|||
|
||||
private $runDaemonsAsUser = null;
|
||||
|
||||
protected final function loadAvailableDaemonClasses() {
|
||||
final protected function loadAvailableDaemonClasses() {
|
||||
$loader = new PhutilSymbolLoader();
|
||||
return $loader
|
||||
->setAncestorClass('PhutilDaemon')
|
||||
|
@ -13,12 +13,12 @@ abstract class PhabricatorDaemonManagementWorkflow
|
|||
->selectSymbolsWithoutLoading();
|
||||
}
|
||||
|
||||
protected final function getPIDDirectory() {
|
||||
final protected function getPIDDirectory() {
|
||||
$path = PhabricatorEnv::getEnvConfig('phd.pid-directory');
|
||||
return $this->getControlDirectory($path);
|
||||
}
|
||||
|
||||
protected final function getLogDirectory() {
|
||||
final protected function getLogDirectory() {
|
||||
$path = PhabricatorEnv::getEnvConfig('phd.log-directory');
|
||||
return $this->getControlDirectory($path);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ abstract class PhabricatorDaemonManagementWorkflow
|
|||
return $path;
|
||||
}
|
||||
|
||||
protected final function loadRunningDaemons() {
|
||||
final protected function loadRunningDaemons() {
|
||||
$daemons = array();
|
||||
|
||||
$pid_dir = $this->getPIDDirectory();
|
||||
|
@ -56,7 +56,7 @@ abstract class PhabricatorDaemonManagementWorkflow
|
|||
return array_mergev($daemons);
|
||||
}
|
||||
|
||||
protected final function loadAllRunningDaemons() {
|
||||
final protected function loadAllRunningDaemons() {
|
||||
$local_daemons = $this->loadRunningDaemons();
|
||||
|
||||
$local_ids = array();
|
||||
|
@ -114,7 +114,7 @@ abstract class PhabricatorDaemonManagementWorkflow
|
|||
return head($match);
|
||||
}
|
||||
|
||||
protected final function launchDaemons(
|
||||
final protected function launchDaemons(
|
||||
array $daemons,
|
||||
$debug,
|
||||
$run_as_current_user = false) {
|
||||
|
@ -307,7 +307,7 @@ abstract class PhabricatorDaemonManagementWorkflow
|
|||
/* -( Commands )----------------------------------------------------------- */
|
||||
|
||||
|
||||
protected final function executeStartCommand(array $options) {
|
||||
final protected function executeStartCommand(array $options) {
|
||||
PhutilTypeSpec::checkMap(
|
||||
$options,
|
||||
array(
|
||||
|
@ -377,7 +377,7 @@ abstract class PhabricatorDaemonManagementWorkflow
|
|||
return 0;
|
||||
}
|
||||
|
||||
protected final function executeStopCommand(
|
||||
final protected function executeStopCommand(
|
||||
array $pids,
|
||||
array $options) {
|
||||
|
||||
|
@ -454,7 +454,7 @@ abstract class PhabricatorDaemonManagementWorkflow
|
|||
return 0;
|
||||
}
|
||||
|
||||
protected final function executeReloadCommand(array $pids) {
|
||||
final protected function executeReloadCommand(array $pids) {
|
||||
$console = PhutilConsole::getConsole();
|
||||
|
||||
$daemons = $this->loadRunningDaemons();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
abstract class DifferentialLandingStrategy {
|
||||
|
||||
public abstract function processLandRequest(
|
||||
abstract public function processLandRequest(
|
||||
AphrontRequest $request,
|
||||
DifferentialRevision $revision,
|
||||
PhabricatorRepository $repository);
|
||||
|
@ -10,7 +10,7 @@ abstract class DifferentialLandingStrategy {
|
|||
/**
|
||||
* @return PhabricatorActionView or null.
|
||||
*/
|
||||
public abstract function createMenuItem(
|
||||
abstract public function createMenuItem(
|
||||
PhabricatorUser $viewer,
|
||||
DifferentialRevision $revision,
|
||||
PhabricatorRepository $repository);
|
||||
|
|
|
@ -10,42 +10,42 @@ abstract class DivinerPublisher {
|
|||
private $symbolReverseMap;
|
||||
private $dropCaches;
|
||||
|
||||
public final function setDropCaches($drop_caches) {
|
||||
final public function setDropCaches($drop_caches) {
|
||||
$this->dropCaches = $drop_caches;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public final function setRenderer(DivinerRenderer $renderer) {
|
||||
final public function setRenderer(DivinerRenderer $renderer) {
|
||||
$renderer->setPublisher($this);
|
||||
$this->renderer = $renderer;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public final function getRenderer() {
|
||||
final public function getRenderer() {
|
||||
return $this->renderer;
|
||||
}
|
||||
|
||||
public final function setConfig(array $config) {
|
||||
final public function setConfig(array $config) {
|
||||
$this->config = $config;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public final function getConfig($key, $default = null) {
|
||||
final public function getConfig($key, $default = null) {
|
||||
return idx($this->config, $key, $default);
|
||||
}
|
||||
|
||||
public final function getConfigurationData() {
|
||||
final public function getConfigurationData() {
|
||||
return $this->config;
|
||||
}
|
||||
|
||||
public final function setAtomCache(DivinerAtomCache $cache) {
|
||||
final public function setAtomCache(DivinerAtomCache $cache) {
|
||||
$this->atomCache = $cache;
|
||||
$graph_map = $this->atomCache->getGraphMap();
|
||||
$this->atomGraphHashToNodeHashMap = array_flip($graph_map);
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected final function getAtomFromGraphHash($graph_hash) {
|
||||
final protected function getAtomFromGraphHash($graph_hash) {
|
||||
if (empty($this->atomGraphHashToNodeHashMap[$graph_hash])) {
|
||||
throw new Exception(pht("No such atom '%s'!", $graph_hash));
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ abstract class DivinerPublisher {
|
|||
$this->atomGraphHashToNodeHashMap[$graph_hash]);
|
||||
}
|
||||
|
||||
protected final function getAtomFromNodeHash($node_hash) {
|
||||
final protected function getAtomFromNodeHash($node_hash) {
|
||||
if (empty($this->atomMap[$node_hash])) {
|
||||
$dict = $this->atomCache->getAtom($node_hash);
|
||||
$this->atomMap[$node_hash] = DivinerAtom::newFromDictionary($dict);
|
||||
|
@ -62,7 +62,7 @@ abstract class DivinerPublisher {
|
|||
return $this->atomMap[$node_hash];
|
||||
}
|
||||
|
||||
protected final function getSimilarAtoms(DivinerAtom $atom) {
|
||||
final protected function getSimilarAtoms(DivinerAtom $atom) {
|
||||
if ($this->symbolReverseMap === null) {
|
||||
$rmap = array();
|
||||
$smap = $this->atomCache->getSymbolMap();
|
||||
|
@ -94,7 +94,7 @@ abstract class DivinerPublisher {
|
|||
* `f()`, we assign them an arbitrary (but fairly stable) order and publish
|
||||
* them as `function/f/1/`, `function/f/2/`, etc., or similar.
|
||||
*/
|
||||
protected final function getAtomSimilarIndex(DivinerAtom $atom) {
|
||||
final protected function getAtomSimilarIndex(DivinerAtom $atom) {
|
||||
$atoms = $this->getSimilarAtoms($atom);
|
||||
if (count($atoms) == 1) {
|
||||
return 0;
|
||||
|
@ -116,7 +116,7 @@ abstract class DivinerPublisher {
|
|||
abstract protected function createDocumentsByHash(array $hashes);
|
||||
abstract public function findAtomByRef(DivinerAtomRef $ref);
|
||||
|
||||
public final function publishAtoms(array $hashes) {
|
||||
final public function publishAtoms(array $hashes) {
|
||||
$existing = $this->loadAllPublishedHashes();
|
||||
|
||||
if ($this->dropCaches) {
|
||||
|
@ -140,7 +140,7 @@ abstract class DivinerPublisher {
|
|||
$this->createDocumentsByHash($created);
|
||||
}
|
||||
|
||||
protected final function shouldGenerateDocumentForAtom(DivinerAtom $atom) {
|
||||
final protected function shouldGenerateDocumentForAtom(DivinerAtom $atom) {
|
||||
switch ($atom->getType()) {
|
||||
case DivinerAtom::TYPE_METHOD:
|
||||
case DivinerAtom::TYPE_FILE:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
abstract class DrydockController extends PhabricatorController {
|
||||
|
||||
public abstract function buildSideNavView();
|
||||
abstract public function buildSideNavView();
|
||||
|
||||
public function buildApplicationMenu() {
|
||||
return $this->buildSideNavView()->getMenu();
|
||||
|
|
|
@ -72,7 +72,7 @@ abstract class HarbormasterBuildStepImplementation {
|
|||
* Loads the settings for this build step implementation from a build
|
||||
* step or target.
|
||||
*/
|
||||
public final function loadSettings($build_object) {
|
||||
final public function loadSettings($build_object) {
|
||||
$this->settings = $build_object->getDetails();
|
||||
return $this;
|
||||
}
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
|
||||
abstract class HeraldCustomAction {
|
||||
|
||||
public abstract function appliesToAdapter(HeraldAdapter $adapter);
|
||||
abstract public function appliesToAdapter(HeraldAdapter $adapter);
|
||||
|
||||
public abstract function appliesToRuleType($rule_type);
|
||||
abstract public function appliesToRuleType($rule_type);
|
||||
|
||||
public abstract function getActionKey();
|
||||
abstract public function getActionKey();
|
||||
|
||||
public abstract function getActionName();
|
||||
abstract public function getActionName();
|
||||
|
||||
public abstract function getActionType();
|
||||
abstract public function getActionType();
|
||||
|
||||
public abstract function applyEffect(
|
||||
abstract public function applyEffect(
|
||||
HeraldAdapter $adapter,
|
||||
$object,
|
||||
HeraldEffect $effect);
|
||||
|
|
|
@ -18,8 +18,8 @@ abstract class ManiphestExcelFormat {
|
|||
return $objects;
|
||||
}
|
||||
|
||||
public abstract function getName();
|
||||
public abstract function getFileName();
|
||||
abstract public function getName();
|
||||
abstract public function getFileName();
|
||||
|
||||
public function getOrder() {
|
||||
return 0;
|
||||
|
@ -35,7 +35,7 @@ abstract class ManiphestExcelFormat {
|
|||
/**
|
||||
* @phutil-external-symbol class PHPExcel
|
||||
*/
|
||||
public abstract function buildWorkbook(
|
||||
abstract public function buildWorkbook(
|
||||
PHPExcel $workbook,
|
||||
array $tasks,
|
||||
array $handles,
|
||||
|
|
|
@ -29,7 +29,7 @@ final class PhabricatorFeedStoryNotification extends PhabricatorFeedDAO {
|
|||
) + parent::getConfiguration();
|
||||
}
|
||||
|
||||
static public function updateObjectNotificationViews(
|
||||
public static function updateObjectNotificationViews(
|
||||
PhabricatorUser $user,
|
||||
$object_phid) {
|
||||
|
||||
|
|
|
@ -11,18 +11,18 @@ final class PhabricatorOAuthServerScope {
|
|||
* used to simplify code for data that is not currently accessible
|
||||
* via OAuth.
|
||||
*/
|
||||
static public function getScopesDict() {
|
||||
public static function getScopesDict() {
|
||||
return array(
|
||||
self::SCOPE_OFFLINE_ACCESS => 1,
|
||||
self::SCOPE_WHOAMI => 1,
|
||||
);
|
||||
}
|
||||
|
||||
static public function getDefaultScope() {
|
||||
public static function getDefaultScope() {
|
||||
return self::SCOPE_WHOAMI;
|
||||
}
|
||||
|
||||
static public function getCheckboxControl(
|
||||
public static function getCheckboxControl(
|
||||
array $current_scopes) {
|
||||
|
||||
$have_options = false;
|
||||
|
@ -56,7 +56,7 @@ final class PhabricatorOAuthServerScope {
|
|||
return null;
|
||||
}
|
||||
|
||||
static private function getCheckboxLabel($scope) {
|
||||
private static function getCheckboxLabel($scope) {
|
||||
$label = null;
|
||||
switch ($scope) {
|
||||
case self::SCOPE_OFFLINE_ACCESS:
|
||||
|
@ -70,7 +70,7 @@ final class PhabricatorOAuthServerScope {
|
|||
return $label;
|
||||
}
|
||||
|
||||
static public function getScopesFromRequest(AphrontRequest $request) {
|
||||
public static function getScopesFromRequest(AphrontRequest $request) {
|
||||
$scopes = self::getScopesDict();
|
||||
$requested_scopes = array();
|
||||
foreach ($scopes as $scope => $bit) {
|
||||
|
@ -86,7 +86,7 @@ final class PhabricatorOAuthServerScope {
|
|||
* A scopes list is considered valid if each scope is a known scope
|
||||
* and each scope is seen only once. Otherwise, the list is invalid.
|
||||
*/
|
||||
static public function validateScopesList($scope_list) {
|
||||
public static function validateScopesList($scope_list) {
|
||||
$scopes = explode(' ', $scope_list);
|
||||
$known_scopes = self::getScopesDict();
|
||||
$seen_scopes = array();
|
||||
|
@ -107,7 +107,7 @@ final class PhabricatorOAuthServerScope {
|
|||
* A scopes dictionary is considered valid if each key is a known scope.
|
||||
* Otherwise, the dictionary is invalid.
|
||||
*/
|
||||
static public function validateScopesDict($scope_dict) {
|
||||
public static function validateScopesDict($scope_dict) {
|
||||
$known_scopes = self::getScopesDict();
|
||||
$unknown_scopes = array_diff_key($scope_dict,
|
||||
$known_scopes);
|
||||
|
@ -119,7 +119,7 @@ final class PhabricatorOAuthServerScope {
|
|||
* should be validated by @{method:validateScopesList} before
|
||||
* transformation.
|
||||
*/
|
||||
static public function scopesListToDict($scope_list) {
|
||||
public static function scopesListToDict($scope_list) {
|
||||
$scopes = explode(' ', $scope_list);
|
||||
return array_fill_keys($scopes, 1);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ final class PhameBlog extends PhameDAO
|
|||
protected $editPolicy;
|
||||
protected $joinPolicy;
|
||||
|
||||
static private $requestBlog;
|
||||
private static $requestBlog;
|
||||
|
||||
protected function getConfiguration() {
|
||||
return array(
|
||||
|
@ -175,7 +175,7 @@ final class PhameBlog extends PhameDAO
|
|||
return $this->setConfigData($config);
|
||||
}
|
||||
|
||||
static public function getSkinOptionsForSelect() {
|
||||
public static function getSkinOptionsForSelect() {
|
||||
$classes = id(new PhutilSymbolLoader())
|
||||
->setAncestorClass('PhameBlogSkin')
|
||||
->setType('class')
|
||||
|
|
|
@ -34,7 +34,7 @@ final class ReleephSummaryFieldSpecification
|
|||
|
||||
public function renderHelpForArcanist() {
|
||||
$text = pht(
|
||||
"A one-line title summarizing this request. ".
|
||||
'A one-line title summarizing this request. '.
|
||||
'Leave blank to use the original commit title.')."\n";
|
||||
return phutil_console_wrap($text, 8);
|
||||
}
|
||||
|
|
|
@ -665,7 +665,7 @@ abstract class PhabricatorStorageManagementWorkflow
|
|||
return 2;
|
||||
}
|
||||
|
||||
protected final function getBareHostAndPort($host) {
|
||||
final protected function getBareHostAndPort($host) {
|
||||
// Split out port information, since the command-line client requires a
|
||||
// separate flag for the port.
|
||||
$uri = new PhutilURI('mysql://'.$host);
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
abstract class PhabricatorSQLPatchList {
|
||||
|
||||
public abstract function getNamespace();
|
||||
public abstract function getPatches();
|
||||
abstract public function getNamespace();
|
||||
abstract public function getPatches();
|
||||
|
||||
/**
|
||||
* Examine a directory for `.php` and `.sql` files and build patch
|
||||
|
|
Loading…
Add table
Reference in a new issue