Showing 11,545 of 11,545 total issues
Method appendUserGroups
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function appendUserGroups( $property, $numberInGroup ) {
$config = $this->getConfig();
$data = [];
$result = $this->getResult();
Method execute
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( $subpage ) {
$user = $this->getUser();
if (
// Anons don't get a watchlist
!$user->isRegistered()
Method formatPolicies
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function formatPolicies( $policies, $group ) {
$groupPolicies = UserPasswordPolicy::getPoliciesForGroups(
$policies['policies'],
[ $group ],
$policies['policies']['default']
Method execute
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( $par ) {
if ( !$par ) {
$par = 'main';
}
Method showList
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function showList( $result ) {
$out = $this->getOutput();
if ( $result->numRows() == 0 ) {
$out->addWikiMsg( 'undelete-no-results' );
Method formatValue
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function formatValue( $field, $value ) {
$linkRenderer = $this->getLinkRenderer();
switch ( $field ) {
case 'am_title':
$title = Title::makeTitle( NS_MEDIAWIKI, $value . $this->suffix );
Method __construct
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct( ?string $permission, $status = [] ) {
$this->deprecatePublicProperty( 'permission', '1.43' );
$this->deprecatePublicPropertyFallback( 'errors', '1.43',
function () {
return $this->status->toLegacyErrorArray();
Method userToolLinkArray
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function userToolLinkArray(
$userId, $userText, $redContribsWhenNoEdits = false, $flags = 0, $edits = null
): array {
$services = MediaWikiServices::getInstance();
$disableAnonTalk = $services->getMainConfig()->get( MainConfigNames::DisableAnonTalk );
Method save
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function save(
ParserOutput $output,
RevisionRecord $revision,
ParserOptions $parserOptions,
string $cacheTime = null
Method getCachedRevisionObject
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function getCachedRevisionObject( $parser, $title, $vary ) {
if ( !$title ) {
return null;
}
Method getQueryInfo
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getQueryInfo() {
$queryBuilder = DatabaseLogEntry::newSelectQueryBuilder( $this->mDb )
->where( $this->mConds );
# Add log_search table if there are conditions on it.
Method getFile
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFile( $key, $noAuth = false ) {
if ( !preg_match( self::KEY_FORMAT_REGEX, $key ) ) {
throw new UploadStashBadPathException(
wfMessage( 'uploadstash-bad-path-bad-format', $key )
);
Method removeUserFromGroup
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function removeUserFromGroup( UserIdentity $user, string $group ): bool {
$user->assertWiki( $this->wikiId );
// TODO: Deprecate passing out user object in the hook by introducing
// an alternative hook
if ( $this->hookContainer->isRegistered( 'UserRemoveGroup' ) ) {
Method run
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run( $title, $type ) {
$normalizedType = $this->normalizeType( $type );
$this->validateParameterCombination( $normalizedType );
$params = $this->getValidatedParams();
$page = $this->getPage();
Method getConflictData
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getConflictData() {
$body = $this->getValidatedBody();
'@phan-var array $body';
$baseRevId = $body['latest']['id'] ?? 0;
$title = $this->titleParser->parseTitle( $this->getValidatedParams()['title'] );
Method run
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function run( DeferrableUpdate $update ): ?Throwable {
$logger = LoggerFactory::getInstance( 'DeferredUpdates' );
$type = get_class( $update )
. ( $update instanceof DeferrableCallback ? '_' . $update->getOrigin() : '' );
Method __construct
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct( array $config = [] ) {
// Configuration initialization
$config = array_merge(
[
// Config options for nested widgets
Method purgeExpiredRows
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function purgeExpiredRows() {
$services = MediaWikiServices::getInstance();
$rcMaxAge = $services->getMainConfig()->get(
MainConfigNames::RCMaxAge );
$updateRowsPerQuery = $services->getMainConfig()->get(
Method execute
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
// Extract the host and scheme from $wgServer
$server = $this->getConfig()->get( MainConfigNames::Server );
$bits = $this->getServiceContainer()->getUrlUtils()->parse( $server );
if ( !$bits ) {
Method deleteDefaults
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function deleteDefaults() {
$dryRun = $this->hasOption( 'dry' );
$option = $this->getArg( 0 );
$fromUserId = (int)$this->getOption( 'fromuserid', 0 );
$toUserId = (int)$this->getOption( 'touserid', 0 ) ?: null;