Showing 11,545 of 11,545 total issues
Method saveFormData
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function saveFormData( $formData, PreferencesFormOOUI $form, array $formDescriptor ) {
$user = $form->getModifiedUser();
$hiddenPrefs = $this->options->get( MainConfigNames::HiddenPrefs );
$result = true;
Method charCodeString
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function charCodeString( $prop ) {
if ( isset( $this->mFilteredExifData[$prop] ) ) {
if ( strlen( $this->mFilteredExifData[$prop] ) <= 8 ) {
// invalid. Must be at least 9 bytes long.
Method timeHelper
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function timeHelper( $date, $time, $charset ) {
if ( count( $date ) === 1 ) {
// the standard says this should always be 1
// just double checking.
[ $date ] = self::convIPTC( $date, $charset );
Method considerActionsForDefaultSavedQuery
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function considerActionsForDefaultSavedQuery( $subpage ) {
if ( !$this->isStructuredFilterUiEnabled() || $this->including() ) {
return false;
}
Method performAuthenticationStep
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function performAuthenticationStep( $action, array $requests ) {
if ( !in_array( $action, static::$allowedActions, true ) ) {
throw new InvalidArgumentException( 'invalid action: ' . $action );
}
Method runUpdates
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function runUpdates( array $updates, $passSelf, $hasVirtualDomain = false ) {
$lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
$updatesDone = [];
$updatesSkipped = [];
foreach ( $updates as $params ) {
Method getPages
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getPages() {
static $qp = null;
if ( $qp === null ) {
$qp = [
Method getRestrictionData
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getRestrictionData( IResultWrapper $result, $limit ) {
$partialIds = [];
$count = 0;
foreach ( $result as $row ) {
if ( ++$count <= $limit && !( $row->ipb_sitewide ?? $row->bl_sitewide ) ) {
Method extractSlotInfo
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function extractSlotInfo( SlotRecord $slot, $revDel, &$content = null ) {
$vals = [];
ApiResult::setArrayType( $vals, 'assoc' );
if ( $this->fld_slotsize ) {
Method getInvalidTitlesAndRevisions
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getInvalidTitlesAndRevisions( $invalidChecks = [ 'invalidTitles',
'special', 'missingIds', 'missingRevIds', 'missingTitles', 'interwikiTitles' ]
) {
$result = [];
if ( in_array( 'invalidTitles', $invalidChecks ) ) {
Method getStandardParams
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getStandardParams( $action, ...$wantedParams ) {
$params = [
'requests' => [
ParamValidator::PARAM_TYPE => 'string',
ParamValidator::PARAM_ISMULTI => true,
Method getAllowedParams
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAllowedParams() {
$allowedParams = [
'continue' => [
ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
],
Method execute
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$this->useTransactionalTimeLimit();
$params = $this->extractRequestParams();
Method formatHelpMessages
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function formatHelpMessages( array &$res, $key, array $msgs, $joinLists = false ) {
switch ( $this->helpFormat ) {
case 'none':
break;
Method execute
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$params = $this->extractRequestParams();
$this->requireAtLeastOneParameter( $params, 'continue', 'returnurl' );
Method showMergeForm
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function showMergeForm() {
$out = $this->getOutput();
$out->addWikiMsg( 'mergehistory-header' );
$fields = [
Method showActivateDeactivateForm
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function showActivateDeactivateForm( $tag, $activate ) {
$actionStr = $activate ? 'activate' : 'deactivate';
$authority = $this->getAuthority();
if ( !$authority->isAllowed( 'managechangetags' ) ) {
Method reallyDoQuery
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function reallyDoQuery( $offset, $limit, $order ) {
$dbr = $this->getDatabase();
$prevTableName = $this->mTableName;
$this->mTableName = 'image';
[ $tables, $fields, $conds, $fname, $options, $join_conds ] =
Method getForm
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getForm() {
$formDescriptor = [];
$formDescriptor['limit'] = [
'type' => 'radio',
'name' => 'limit',
Method outputRemoteScaledThumb
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function outputRemoteScaledThumb( $file, $params ) {
// We need to use generateThumbName() instead of thumbName(), because
// the suffix needs to match the file name for the remote thumbnailer
// to work
$scalerThumbName = $file->generateThumbName( $file->getName(), $params );