Showing 1,432 of 2,096 total issues
Function focus
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
focus: function () {
// Focus first invalid/incomplete item or - if there is none - the first item.
var listview = this.$listview.data( 'listview' ),
lia = listview.listItemAdapter(),
$items = listview.items();
Method formatResult
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function formatResult(
IResultWrapper $res,
int $limit,
array $prop,
?ApiPageSet $resultPageSet
Method purgeWebCache
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function purgeWebCache(
array $titles,
array $rootJobParams,
$causeAction,
$causeAgent
Method formatEntityUsage
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function formatEntityUsage( array $usages, IContextSource $context ): string {
$usageAspectsByEntity = [];
$entityIds = [];
foreach ( $usages as $entityUsage ) {
Method getOrCreatePingbackId
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getOrCreatePingbackId() {
if ( !$this->id ) {
$dbr = $this->repoConnections->getReadConnection();
$id = $dbr->newSelectQueryBuilder()
Method generateDumpForEntityId
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function generateDumpForEntityId( EntityId $entityId ): ?string {
try {
$entityRevision = $this->entityRevisionLookup->getEntityRevision( $entityId );
if ( !$entityRevision ) {
Method getRankedSearchResults
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRankedSearchResults(
$text,
$languageCode,
$entityType,
$limit,
Method getResultHtml
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getResultHtml( TermSearchResult $searchResult ): string {
$idHtml = $this->getIdHtml( $searchResult->getEntityId() );
$displayLabel = $searchResult->getDisplayLabel();
$displayDescription = $searchResult->getDisplayDescription();
Method equals
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function equals( Content $that = null ) {
if ( $that === $this ) {
return true;
}
Method throwUseCaseError
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function throwUseCaseError( ValidationError $validationError ): void {
$context = $validationError->getContext();
switch ( $validationError->getCode() ) {
case LanguageCodeValidator::CODE_INVALID_LANGUAGE_CODE:
throw UseCaseError::newPatchResultInvalidKey( '', $context[LanguageCodeValidator::CONTEXT_LANGUAGE_CODE] );
Method execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( PatchItemRequest $request ): PatchItemResponse {
$deserializedRequest = $this->validator->validateAndDeserialize( $request );
$providedMetadata = $deserializedRequest->getEditMetadata();
$itemId = $deserializedRequest->getItemId();
Method validate
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function validate( array $serialization, string $basePath = '' ): ?ValidationError {
$expectedFields = [ 'labels', 'descriptions', 'aliases', 'sitelinks', 'statements' ];
foreach ( $expectedFields as $expectedField ) {
$serialization[$expectedField] ??= [];
if ( !is_array( $serialization[$expectedField] ) ) {
Method getAmountAndPrecisionHtml
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getAmountAndPrecisionHtml( $precision, $amount = 1 ) {
if ( $amount === 0 ) {
// TODO: Use NumberLocalizer
return '0';
}
Method getHtml
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getHtml( TermFallback $term ) {
$requestedLanguage = $term->getLanguageCode();
$actualLanguage = $term->getActualLanguageCode();
$sourceLanguage = $term->getSourceLanguageCode();
Method computeSiteDetails
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function computeSiteDetails( MediaWikiSite $site, array $specialGroups, MessageLocalizer $localizer ): array {
$languageNameLookup = $this->languageNameLookupFactory->getForAutonyms();
// FIXME: quickfix to allow a custom site-name / handling for the site groups which are
// special according to the specialSiteLinkGroups setting
Method movePropertyGroup
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function movePropertyGroup( PropertyId $propertyId, $toIndex ) {
if ( $this->getPropertyGroupIndex( $propertyId ) === $toIndex ) {
return;
}
Function getStatementView
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SELF.prototype.getStatementView = function ( startEditingCallback, entityId, propertyId, removeCallback, value, $dom ) {
var currentPropertyId = value ? value.getClaim().getMainSnak().getPropertyId() : propertyId;
var view = this._getView(
'statementview',
$dom,
Function getStatementView
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SELF.prototype.getStatementView = function ( startEditingCallback, entityId, propertyId, removeCallback, value, $dom ) {
var controller;
var startEditingController = function () {
return controller.startEditing();
};
Function _onConfirmationDataLoad
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_onConfirmationDataLoad: function ( entity ) {
var i, itemLink;
if ( entity && entity.sitelinks ) {
var siteLinkCount = 0;
Function search
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
search: function () {
var self = this,
deferred = $.Deferred();
this._clearTimeout();