Showing 11,545 of 11,545 total issues
Method addPageProtectionWarningHeaders
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function addPageProtectionWarningHeaders(
IntroMessageList $messages,
MessageLocalizer $localizer,
ProperPageIdentity $page
): void {
Method importLogItem
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function importLogItem() {
$services = MediaWikiServices::getInstance();
$dbw = $services->getConnectionProvider()->getPrimaryDatabase();
$userName = $this->getUser();
Method freeLocksOnServer
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function freeLocksOnServer( $lockSrv, array $pathsByType ) {
$status = StatusValue::newGood();
$memc = $this->getCache( $lockSrv );
// List of affected paths
Method doGetFileContentsMulti
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function doGetFileContentsMulti( array $params ) {
$ep = array_diff_key( $params, [ 'srcs' => 1 ] ); // for error logging
// Blindly create tmp files and stream to them, catching any exception
// if the file does not exist. Do not waste time doing file stats here.
$reqs = []; // (path => op)
Method tryNormaliseRedirect
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function tryNormaliseRedirect( Title $title ): bool {
$request = $this->getRequest();
$output = $this->getOutput();
if ( $request->getRawVal( 'action', 'view' ) != 'view'
Method buildTagFilterSelector
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function buildTagFilterSelector(
$selected = '', $ooui = false, IContextSource $context = null
) {
if ( !$context ) {
$context = RequestContext::getMain();
Method getInputCodex
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getInputCodex( $value, $hasErrors ) {
// Figure out the value of the select.
$valInSelect = false;
if ( $value !== false ) {
$value = strval( $value );
Method extractPageRecord
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function extractPageRecord( $externalData, $pageTitle ) {
// If there is a special case with only one returned page
// we can cheat, and only return
// the single page in the "pages" substructure.
if ( isset( $externalData['query']['pages'] ) ) {
Method capturePath
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function capturePath(
PageReference $page, IContextSource $context, LinkRenderer $linkRenderer = null
) {
// phpcs:ignore MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgUser
global $wgTitle, $wgOut, $wgRequest, $wgUser, $wgLang;
Method doQuery
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function doQuery( array $userIds, $options = [], $caller = '' ) {
$usersToCheck = [];
$usersToQuery = [];
$userIds = array_unique( $userIds );
Method addResultToCache
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function addResultToCache( $cache, $res ) {
if ( !$res ) {
return [];
}
Method getAllowedParams
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAllowedParams() {
$config = $this->getConfig();
$feedFormatNames = array_keys( $config->get( MainConfigNames::FeedClasses ) );
return [
Method getAllowedParams
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAllowedParams() {
$ret = parent::getAllowedParams() + [
'user' => [
ParamValidator::PARAM_TYPE => 'user',
UserDef::PARAM_ALLOWED_USER_TYPES => [ 'name', 'ip', 'temp', 'id', 'interwiki' ],
Method tryShowFile
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function tryShowFile( $archiveName ) {
$repo = $this->repoGroup->getLocalRepo();
$oimage = $repo->newFromArchiveName( $this->targetObj, $archiveName );
$oimage->load();
// Check if user is allowed to see this file
Method getFormFields
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getFormFields() {
$fields = [
'pagetitle' => [
'type' => 'title',
'creatable' => true,
Method reallyDoQuery
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function reallyDoQuery( $limit, $offset = false ) {
$fname = static::class . '::reallyDoQuery';
$dbr = $this->getRecacheDB();
$query = $this->getQueryInfo();
$conds = isset( $query['conds'] ) ? (array)$query['conds'] : [];
Method getFormFields
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getFormFields( User $target ) {
$linkRenderer = $this->getLinkRenderer();
$user = $this->getUser();
return [
'From' => [
Method showUploads
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function showUploads() {
// sets the title, etc.
$this->setHeaders();
$this->outputHeader();
Method showDeleteTagForm
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function showDeleteTagForm( $tag ) {
$authority = $this->getAuthority();
if ( !$authority->isAllowed( 'deletechangetags' ) ) {
throw new PermissionsError( 'deletechangetags' );
}
Method runForTitle
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function runForTitle( PageIdentity $pageIdentity ) {
$services = MediaWikiServices::getInstance();
$stats = $services->getStatsFactory();
$renderer = $services->getRevisionRenderer();
$parserCache = $services->getParserCache();