Showing 11,545 of 11,545 total issues
Method getAllowedParams
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAllowedParams( $flags = 0 ) {
$feedFormatNames = array_keys( $this->getConfig()->get( MainConfigNames::FeedClasses ) );
$ret = [
'feedformat' => [
ParamValidator::PARAM_DEFAULT => 'rss',
Method execute
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$params = $this->extractRequestParams();
$wikiPage = $this->getTitleOrPageId( $params );
$title = $wikiPage->getTitle();
$this->getErrorFormatter()->setContextTitle( $title );
Method getFormFields
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getFormFields() {
$this->addHelpLink( 'Help:What links here' );
$this->getOutput()->addModuleStyles( 'mediawiki.special' );
$fields = [
Method getActionButtons
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getActionButtons( $formcontents ) {
$canRevDelete = $this->getAuthority()
->isAllowedAll( 'deletedhistory', 'deletelogentry' );
$showTagEditUI = ChangeTags::showTagEditingUI( $this->getAuthority() );
# If the user doesn't have the ability to delete log entries nor edit tags,
Method buildRollbackLink
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function buildRollbackLink(
RevisionRecord $revRecord,
IContextSource $context = null,
$editCount = false
) {
Method buildRemoveLine
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function buildRemoveLine( $title, string $expiryDaysText = '' ): string {
$linkRenderer = $this->getLinkRenderer();
$link = $linkRenderer->makeLink( $title );
$tools = [];
Method exportJS
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function exportJS() {
$out = $this->getOutput();
$req = $this->getContext()->getRequest();
$rl = $out->getResourceLoader();
Method push
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function push( $jobs ) {
$jobs = is_array( $jobs ) ? $jobs : [ $jobs ];
if ( $jobs === [] ) {
return;
}
Method pstPass2
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function pstPass2( $text, UserIdentity $user ) {
# Note: This is the timestamp saved as hardcoded wikitext to the database, we use
# $this->contLang here in order to give everyone the same signature and use the default one
# rather than the one selected in each user's preferences. (see also T14815)
$ts = $this->mOptions->getTimestamp();
Method newChild
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function newChild( $args = false, $title = false, $indexOffset = 0 ) {
$namedArgs = [];
$numberedArgs = [];
if ( $title === false ) {
$title = $this->title;
Method formatParameterValue
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function formatParameterValue( $type, $value ) {
$saveLinkFlood = $this->linkFlood;
switch ( strtolower( trim( $type ) ) ) {
case 'raw':
Method publish
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function publish( $newId, $to = 'rcandudp' ) {
$canAddTags = true;
// FIXME: this code should be removed once all callers properly call publish()
if ( $to === 'udp' && !$newId && !$this->getAssociatedRevId() ) {
\MediaWiki\Logger\LoggerFactory::getInstance( 'logging' )->warning(
Method storeBatch
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function storeBatch( array $triplets, $flags = 0 ) {
$this->assertWritableRepo(); // fail out if read-only
if ( $flags & self::DELETE_SOURCE ) {
throw new InvalidArgumentException( "DELETE_SOURCE not supported in " . __METHOD__ );
Method execute
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$repo = $this->file->getRepo();
$lockStatus = $this->file->acquireFileLock();
if ( !$lockStatus->isOK() ) {
return $lockStatus;
Method getBackendPaths
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getBackendPaths( array $paths, $latest = true ) {
$db = $this->getDB( $latest ? DB_PRIMARY : DB_REPLICA );
// @TODO: batching
$resolved = [];
Method maybeUpgradeRow
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function maybeUpgradeRow() {
if ( MediaWikiServices::getInstance()->getReadOnlyMode()->isReadOnly() || $this->upgrading ) {
return;
}
Method setProps
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function setProps( $info ) {
$this->dataLoaded = true;
$fields = $this->getCacheFields( '' );
$fields[] = 'fileExists';
Method parseNamespacePrefixes
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function parseNamespacePrefixes(
$query,
$withAllKeyword = true,
$withPrefixSearchExtractNamespaceHook = false
) {
Method markPatrolled
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function markPatrolled( Authority $performer, $tags = null ): PermissionStatus {
$services = MediaWikiServices::getInstance();
$mainConfig = $services->getMainConfig();
$useRCPatrol = $mainConfig->get( MainConfigNames::UseRCPatrol );
$useNPPatrol = $mainConfig->get( MainConfigNames::UseNPPatrol );
Method execute
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$services = $this->getServiceContainer();
$lbFactory = $services->getDBLoadBalancerFactory();
$stats = $services->getStatsFactory();
$lbsByType = [