Showing 11,545 of 11,545 total issues
Method preloadTitleInfo
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function preloadTitleInfo(
Context $context, array $moduleNames
) {
$rl = $context->getResourceLoader();
// getDB() can be overridden to point to a foreign database.
Method initTimestampLimits
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function initTimestampLimits() {
// Max timestamp should be min of destination page
$firstDestTimestamp = $this->dbw->newSelectQueryBuilder()
->select( 'MIN(rev_timestamp)' )
->from( 'revision' )
Method initAndPopPoolSlotList
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function initAndPopPoolSlotList( RedisConnRef $conn, $now ) {
static $script = /** @lang Lua */ <<<LUA
local kSlots,kSlotsNextRelease,kSlotWaits = unpack(KEYS)
local rMaxWorkers,rMaxQueue,rTimeout,rExpiry,rSess,rTime = unpack(ARGV)
-- Initialize if the "next release" time sorted-set is empty. The slot key
Method findMostProgress
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function findMostProgress( $M, $N, $limit, $V ) {
$delta = $N - $M;
if ( ( $M & 1 ) == ( $limit & 1 ) ) {
$forward_start_diag = max( -$M, -$limit );
Method skinPreferences
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function skinPreferences( User $user, IContextSource $context, &$defaultPreferences ) {
// Skin selector, if there is at least one valid skin
$validSkinNames = $this->getValidSkinNames( $user, $context );
if ( $validSkinNames ) {
$defaultPreferences['skin'] = [
Method saveSites
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function saveSites( array $sites ) {
if ( !$sites ) {
return true;
}
Method execute
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$this->useTransactionalTimeLimit();
$params = $this->extractRequestParams();
Method getAllowedParams
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAllowedParams() {
$params = [
'user' => [
ParamValidator::PARAM_TYPE => 'user',
UserDef::PARAM_ALLOWED_USER_TYPES => [ 'name', 'ip', 'temp', 'cidr', 'id' ],
Method formatResult
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function formatResult( $skin, $result ) {
// If no Title B or C is in the query, it means this came from
// querycache (which only saves the 3 columns for title A).
// That does save the bulk of the query cost, but now we need to
// get a little more detail about each individual entry quickly
Method deleteServerObjectsExpiringBefore
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function deleteServerObjectsExpiringBefore(
IDatabase $db,
$timestamp,
$limit,
&$keysDeletedCount = 0,
Method execute
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( $par ) {
$this->setHeaders();
$this->outputHeader();
$out = $this->getOutput();
$out->disallowUserJs(); # Prevent hijacked user scripts from sniffing passwords etc.
Method execute
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( $par ) {
$this->useTransactionalTimeLimit();
$this->setHeaders();
$this->outputHeader();
Method getEntryPointInfo
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getEntryPointInfo() {
$config = $this->getConfig();
$scriptPath = $config->get( MainConfigNames::ScriptPath ) ?: '/';
$entryPoints = [
Method execute
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( $par ) {
$context = new DerivativeContext( $this->getContext() );
$this->setHeaders();
$this->outputHeader();
Method displaytitle
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function displaytitle( $parser, $text = '', $uarg = '' ) {
$restrictDisplayTitle = MediaWikiServices::getInstance()->getMainConfig()
->get( MainConfigNames::RestrictDisplayTitle );
static $magicWords = null;
Method handleExternalLinks
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function handleExternalLinks( $text ) {
$bits = preg_split( $this->mExtLinkBracketedRegex, $text, -1, PREG_SPLIT_DELIM_CAPTURE );
// @phan-suppress-next-line PhanTypeComparisonFromArray See phan issue #3161
if ( $bits === false ) {
throw new RuntimeException( "PCRE failure" );
Method findFile
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function findFile( $title, $options = [] ) {
if ( !empty( $options['private'] ) && !( $options['private'] instanceof Authority ) ) {
throw new InvalidArgumentException(
__METHOD__ . ' called with the `private` option set to something ' .
'other than an Authority object'
Method deleteOptions
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function deleteOptions() {
$dryRun = $this->hasOption( 'dry' );
$option = $this->getArg( 0 );
$fromUserId = (int)$this->getOption( 'fromuserid', 0 );
$toUserId = (int)$this->getOption( 'touserid', 0 ) ?: null;
Method execute
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$ns = $this->getOption( 'ns', NS_MEDIAWIKI );
$delete = $this->hasOption( 'delete' );
$all = $this->hasOption( 'all' );
$dbw = $this->getPrimaryDB();
File WikiRevision.php
has 263 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* MediaWiki page data importer.
*
* Copyright © 2003,2005 Brooke Vibber <bvibber@wikimedia.org>