Showing 11,545 of 11,545 total issues
Method writeUpload
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function writeUpload( $file, $dumpContents = false ) {
if ( $file->isOld() ) {
/** @var OldLocalFile $file */
'@phan-var OldLocalFile $file';
$archiveName = " " .
Method doUpdate
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function doUpdate() {
// Do extensive checks, as the update may be carried out even months after the edit
if ( !$this->shouldExecute() ) {
return;
}
Method doCopyInternal
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function doCopyInternal( array $params ) {
$status = $this->newStatus();
[ $srcCont, $srcRel ] = $this->resolveStoragePathReal( $params['src'] );
if ( $srcRel === null ) {
Method doDescribeInternal
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function doDescribeInternal( array $params ) {
$status = $this->newStatus();
[ $srcCont, $srcRel ] = $this->resolveStoragePathReal( $params['src'] );
if ( $srcRel === null ) {
Method doStoreInternal
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function doStoreInternal( array $params ) {
$status = $this->newStatus();
$fsSrcPath = $params['src']; // file system path
$fsDstPath = $this->resolveToFSPath( $params['dst'] );
Method __construct
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct( array $config ) {
if ( !array_key_exists( 'name', $config ) ) {
throw new InvalidArgumentException( 'Backend name not specified.' );
}
$this->name = $config['name'];
Method rollback
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
final public function rollback( $fname = __METHOD__, $flush = self::FLUSHING_ONE ) {
if (
$flush !== self::FLUSHING_INTERNAL &&
$flush !== self::FLUSHING_ALL_PEERS &&
$this->flagsHolder->hasImplicitTrxFlag()
Method parseDTD
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function parseDTD( $dtd ) {
$m = [];
$res = preg_match(
'/^<!DOCTYPE\s*\S+\s*' .
'(?:(?P<typepublic>PUBLIC)\s*' .
Method getFooter
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getFooter( $iconStyle = 'icononly', $linkStyle = 'flat' ) {
$validFooterIcons = $this->get( 'footericons' );
if ( $iconStyle === 'icononly' ) {
$this->unsetIconsWithoutImages( $validFooterIcons );
} else {
Method validate
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function validate( $value, $alldata ) {
// If the value is null, reset it to an empty string which is what is expected by the parent.
$value ??= '';
// If the value is empty, there are no additional checks that can be performed.
Method getRawText
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRawText() {
$text = false;
$title = $this->getTitle();
$request = $this->getRequest();
Method formatDurationBetweenTimestamps
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function formatDurationBetweenTimestamps(
int $timestamp1,
int $timestamp2,
?int $precision = null
): string {
Method renderingPreferences
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function renderingPreferences(
User $user,
MessageLocalizer $l10n,
&$defaultPreferences
) {
Method normalizePageName
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function normalizePageName( string $pageName, $apiUrl, $followRedirect = self::FOLLOW_REDIRECT ) {
if ( $followRedirect === self::FOLLOW_REDIRECT ) {
$redirects = true;
} elseif ( $followRedirect === self::NOFOLLOW_REDIRECT ) {
$redirects = false;
Method getPageHtml
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getPageHtml( $formHtml ) {
$loginPrompt = $this->isSignup() ? '' : Html::rawElement( 'div',
[ 'id' => 'userloginprompt' ], $this->msg( 'loginprompt' )->parseAsBlock() );
$languageLinks = $this->getConfig()->get( MainConfigNames::LoginLanguageSelector )
? $this->makeLanguageSelector() : '';
Method submit
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function submit() {
$status = $this->submitWebUserBox();
if ( !$status->isOK() ) {
return $status;
}
Method partition
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function partition( $table, $batchSize ) {
if ( isset( $this->partitionCache[$table][$batchSize] ) ) {
$this->logger->debug( __METHOD__ . ": got from partition cache" );
return $this->partitionCache[$table][$batchSize]['batches'];
Method preUpgrade
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function preUpgrade() {
global $wgDBuser, $wgDBpassword;
$status = $this->getConnection( self::CONN_CREATE_TABLES );
if ( !$status->isOK() ) {
Method getAllowedParams
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAllowedParams() {
return [
'from' => null,
'to' => null,
'prefix' => null,
Method validateValue
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function validateValue( $value ) {
if ( is_object( $value ) ) {
// Note we use is_callable() here instead of instanceof because
// ApiSerializable is an informal protocol (see docs there for details).
if ( is_callable( [ $value, 'serializeForApiResult' ] ) ) {