Showing 11,545 of 11,545 total issues
Method loadAsComponents
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function loadAsComponents( bool $inlineReferences = false ): array {
$schemas = [];
$defs = [];
$obsolete = [];
Method showProtectionIndicator
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function showProtectionIndicator(): void {
$title = $this->getTitle();
$context = $this->getContext();
$outputPage = $context->getOutput();
Method load
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function load(): array {
$key = $this->cache->makeGlobalKey(
__CLASS__,
$this->source->getHashKey()
);
Method showRedirectedFromHeader
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function showRedirectedFromHeader() {
$context = $this->getContext();
$redirectSources = $context->getConfig()->get( MainConfigNames::RedirectSources );
$outputPage = $context->getOutput();
$request = $context->getRequest();
Method getPreloadLinks
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getPreloadLinks( Context $context ): array {
if ( !in_array( 'logo', $this->features ) ) {
return [];
}
Method handleExtensionDependency
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function handleExtensionDependency( $dependencyName, $constraint, $checkedExt,
$type
) {
// Check if the dependency is even installed
if ( !isset( $this->loaded[$dependencyName] ) ) {
Method combineSlotOutput
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function combineSlotOutput( RenderedRevision $rrev, ParserOptions $options, array $hints = [] ) {
$revision = $rrev->getRevision();
$slots = $revision->getSlots()->getSlots();
$withHtml = $hints['generate-html'] ?? true;
Method stripComments
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function stripComments( $json ) {
// Ensure we have a string
$str = (string)$json;
$buffer = '';
$maxLen = strlen( $str );
Method factorCondsWithCommonFields
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function factorCondsWithCommonFields( $condsArray ) {
$first = $condsArray[array_key_first( $condsArray )];
if ( count( $first ) === 1 ) {
// IN clause
$field = array_key_first( $first );
Method tabAction
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function tabAction( $title, $message, $selected, $query = '', $checkEdit = false ) {
$classes = [];
if ( $selected ) {
$classes[] = 'selected';
}
Method compile
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function compile( $templateName ) {
$filename = $this->getTemplateFilename( $templateName );
if ( !file_exists( $filename ) ) {
throw new RuntimeException( "Could not find template `{$templateName}` at {$filename}" );
Method onView
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function onView() {
$this->getOutput()->addModuleStyles( [
'mediawiki.interface.helpers.styles',
'mediawiki.action.styles',
] );
Method loadSites
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function loadSites() {
$this->sites = new SiteList();
$dbr = $this->dbProvider->getReplicaDatabase();
Method run
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function run( $resultPageSet = null ) {
$params = $this->extractRequestParams();
$search = $params['search'];
$limit = $params['limit'];
$offset = $params['offset'];
Method patch
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function patch( $base, $diff ) {
if ( function_exists( 'xdiff_string_bpatch' ) ) {
return xdiff_string_bpatch( $base, $diff );
}
Method recordCondition
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function recordCondition(
DataMessageValue $message, $name, $value, array $settings, array $options
) {
/** @var \ApiBase $module */
$module = $options['module'];
Method mergeThumbParams
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function mergeThumbParams( $image, $thumbParams, $otherParams ) {
if ( $thumbParams === null ) {
// No scaling requested
return null;
}
Method checkRequiredPHPVersion
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function checkRequiredPHPVersion() {
$minimumVersion = '7.4.3';
/**
* This is a list of known-bad ranges of PHP versions. Syntax is like SemVer – either:
Method modifyTableSpecificBlobsForCas
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function modifyTableSpecificBlobsForCas(
IDatabase $db,
string $ptable,
float $mtime,
array $argsByKey,
Method outputHTMLForm
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function outputHTMLForm( $namespace = NS_MAIN,
$from = '', $to = '', $hideRedirects = false
) {
$miserMode = (bool)$this->getConfig()->get( MainConfigNames::MiserMode );
$formDescriptor = [