Showing 11,545 of 11,545 total issues
Method isValidMove
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function isValidMove() {
$status = new Status();
if ( $this->oldTitle->equals( $this->newTitle ) ) {
$status->fatal( 'selfmove' );
Method getBody
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getBody() {
$s = '';
$this->doQuery();
if ( count( $this->mHist ) ) {
if ( $this->mImg->isLocal() ) {
Method getEmptySessionInternal
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getEmptySessionInternal( WebRequest $request = null, $id = null ) {
if ( $id !== null ) {
if ( !self::validateSessionId( $id ) ) {
throw new InvalidArgumentException( 'Invalid session ID' );
}
Method getPreloadedContentFromParams
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getPreloadedContentFromParams(
ProperPageIdentity $contextPage,
Authority $performer,
?string $preload,
array $preloadParams
Method getRevisionHeader
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRevisionHeader( RevisionRecord $rev, $complete = '' ) {
$lang = $this->getLanguage();
$user = $this->getUser();
$revtimestamp = $rev->getTimestamp();
$timestamp = $lang->userTimeAndDate( $revtimestamp, $user );
Method initializeClient
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function initializeClient( Memcached $client, array $params ) {
if ( $client->getServerList() ) {
$this->logger->debug( __METHOD__ . ": pre-initialized client instance." );
return; // preserve persistent handle
Method awaitSessionPrimaryPos
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function awaitSessionPrimaryPos( $index, $timeout = null ) {
$timeout = max( 1, intval( $timeout ?: self::MAX_WAIT_DEFAULT ) );
if ( !$this->waitForPos || $index === ServerInfo::WRITER_INDEX ) {
return true;
Method placeBlockInternal
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function placeBlockInternal( bool $reblock = true ): Status {
$block = $this->configureBlock();
$denyReason = [ 'hookaborted' ];
$legacyUser = $this->userFactory->newFromAuthority( $this->performer );
Method getOOUI
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getOOUI( $value ) {
$inputField = $this->getInputOOUI( $value );
if ( !$inputField ) {
// This field doesn't have an OOUI implementation yet at all. Fall back to getDiv() to
Method getSizeAndMetadataWithFallback
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
final public function getSizeAndMetadataWithFallback( $file, $path ) {
if ( !$this->useLegacyMetadata() ) {
if ( $file instanceof MediaHandlerState ) {
$state = $file;
} else {
Method execute
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$user = $this->getUserForUpdatesOrNull();
if ( !$user || !$user->isNamed() ) {
$this->dieWithError(
[ 'apierror-mustbeloggedin', $this->msg( 'action-editmyoptions' ) ], 'notloggedin'
Method execute
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$this->useTransactionalTimeLimit();
$params = $this->extractRequestParams();
Method execute
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( $par ) {
$this->setHeaders();
$this->outputHeader();
$this->getOutput()->addModuleStyles( 'mediawiki.special' );
Method execute
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( $par ) {
$this->getOutput()->disable();
if ( $this->readOnlyMode->isReadOnly() ) {
wfHttpError( 423, 'Locked', 'Wiki is in read-only mode.' );
Method doMainQuery
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function doMainQuery( $tables, $fields, $conds, $query_options,
$join_conds, FormOptions $opts
) {
$dbr = $this->getDB();
Method makeBrokenImageLinkObj
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function makeBrokenImageLinkObj(
$title, $label = '', $query = '', $unused1 = '', $unused2 = '',
$time = false, array $handlerParams = [], bool $currentExists = false
) {
if ( !$title instanceof LinkTarget ) {
Method get
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get( PageRecord $page, $popts, $useOutdated = false ) {
$page->assertWiki( PageRecord::LOCAL );
if ( !$page->exists() ) {
$this->incrementStats( $page, 'miss', 'nonexistent' );
Method getHashes
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getHashes( StatusValue $status ): array {
$hashes = [];
[ $oldRels, $deleteCurrent ] = $this->getOldRels();
if ( $deleteCurrent ) {
Method getQueryConditions
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getQueryConditions( $filterEntry, array $options = [] ) {
$options += [
'protocol' => [ 'http://', 'https://' ],
'oneWildcard' => false,
'db' => null,
Method runMysql
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function runMysql( $info, $dbName ) {
// Write the password to an option file to avoid disclosing it to other
// processes running on the system
$tmpFile = TempFSFile::factory( 'mw-mysql', 'ini' );
chmod( $tmpFile->getPath(), 0600 );