Showing 11,545 of 11,545 total issues
Method getMessageForLang
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getMessageForLang( $lang, $lckey, $useDB, &$alreadyTried ) {
$langcode = $lang->getCode();
// Try checking the database for the requested language
if ( $useDB ) {
Method normaliseParams
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function normaliseParams( $image, &$params ) {
if ( !isset( $params['width'] ) ) {
return false;
}
Method convertDumpToJSON
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function convertDumpToJSON( $dump ) {
if ( strval( $dump ) == '' ) {
return false;
}
Method getForm
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getForm() {
$context = $this->getContext();
$onSubmit = [ $this, 'onSubmit' ];
if ( $this->reauthPostData ) {
Method performStash
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function performStash( $failureMode, &$data = null ) {
$isPartial = (bool)$this->mParams['chunk'];
try {
$status = $this->mUpload->tryStashFile( $this->getUser(), $isPartial );
Method populateResult
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function populateResult( $search, &$results ) {
$result = $this->getResult();
switch ( $this->getFormat() ) {
case 'json':
Method getVisitingWatcherInfo
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getVisitingWatcherInfo() {
$config = $this->getConfig();
$db = $this->getDB();
$canUnwatchedpages = $this->getAuthority()->isAllowed( 'unwatchedpages' );
Method getAllowedParams
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAllowedParams() {
return [
'action' => [
ParamValidator::PARAM_DEFAULT => 'help',
ParamValidator::PARAM_TYPE => 'submodule',
Method formatPermissions
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function formatPermissions( $permissions, $revoke, $add, $remove, $addSelf, $removeSelf ) {
$r = [];
foreach ( $permissions as $permission ) {
// show as granted only if it isn't revoked to prevent duplicate display of permissions
if ( !isset( $revoke[$permission] ) || !$revoke[$permission] ) {
Method listItem
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function listItem( stdClass $row, PageIdentity $nt, LinkTarget $target, bool $notClose = false ) {
$legacyTitle = $this->titleFactory->newFromPageIdentity( $nt );
$dirmark = $this->getLanguage()->getDirMark();
if ( $row->rd_from ) {
Method buildCheckBoxes
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function buildCheckBoxes() {
// If there is just one item, provide the user with a multi-select field
$list = $this->getList();
$tags = [];
if ( $list->length() == 1 ) {
Method headElement
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function headElement( Skin $sk, $includeStyle = true ) {
$config = $this->getConfig();
$userdir = $this->getLanguage()->getDir();
$services = MediaWikiServices::getInstance();
$sitedir = $services->getContentLanguage()->getDir();
Method hitThumbUrl
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function hitThumbUrl( LocalFile $file, $transformParams ) {
$config = MediaWikiServices::getInstance()->getMainConfig();
$uploadThumbnailRenderHttpCustomHost =
$config->get( MainConfigNames::UploadThumbnailRenderHttpCustomHost );
$uploadThumbnailRenderHttpCustomDomain =
Method doBatchPushInternal
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function doBatchPushInternal( IDatabase $dbw, array $jobs, $flags, $method ) {
if ( $jobs === [] ) {
return;
}
Method extractTagsAndParams
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function extractTagsAndParams( array $elements, $text, &$matches ) {
static $n = 1;
$stripped = '';
$matches = [];
Method makeLimitReport
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function makeLimitReport() {
$maxIncludeSize = $this->mOptions->getMaxIncludeSize();
$cpuTime = $this->mOutput->getTimeProfile( 'cpu' );
if ( $cpuTime !== null ) {
Method __construct
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct( $list, $types = [], $performer = '', $page = '',
$pattern = false, $conds = [], $year = false, $month = false, $day = false,
$tagFilter = '', $action = '', $logId = 0,
LinkBatchFactory $linkBatchFactory = null,
ActorNormalization $actorNormalization = null,
Method thumbError
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function thumbError( $status, $msgHtml, $msgText = null, $context = [] ) {
$showHostnames = $this->getConfig( MainConfigNames::ShowHostnames );
HeaderCallback::warnIfHeadersSent();
Method execute
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute(): Response {
$ctype = $this->getContentType();
$response = $this->getResponseFactory()->create();
$response->setHeader( 'Content-type', $ctype );
Method fetchParserOutputFromParsoid
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function fetchParserOutputFromParsoid( PageIdentity $page, $revision, bool $mayParse ): ?ParserOutput {
$parserOptions = ParserOptions::newFromAnon();
$parserOptions->setUseParsoid();
try {