Showing 1,432 of 2,096 total issues
Function WbSites
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
wb.sites = new ( function WbSites() {
/**
* Will hold a list of all the sites after getSites() was called. This will cache the result.
*
Function WbSites
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var wbSites = new ( function WbSites() {
/**
* Will hold a list of all the sites after getSites() was called. This will cache the result.
*
Method getAllowedParams
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAllowedParams(): array {
return [
'prop' => [
ParamValidator::PARAM_ISMULTI => true,
ParamValidator::PARAM_TYPE => [
Method newLanguageIndependentLuaBindings
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function newLanguageIndependentLuaBindings(): WikibaseLanguageIndependentLuaBindings {
$mediaWikiServices = MediaWikiServices::getInstance();
$settings = WikibaseClient::getSettings( $mediaWikiServices );
$store = WikibaseClient::getStore( $mediaWikiServices );
$termsLanguages = WikibaseClient::getTermsLanguages( $mediaWikiServices );
Method getUnexpectedUnconnectedBatch
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getUnexpectedUnconnectedBatch(): array {
$dbr = $this->localConnectionManager->getReadConnection();
$lastPosition = $this->position + $this->batchSize * $this->batchSizeSelectMultiplicator;
$result = $dbr->newSelectQueryBuilder()
Method newEntityDiffVisualizer
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function newEntityDiffVisualizer( ?string $type = null, ?IContextSource $context = null ): EntityDiffVisualizer {
if ( $context === null ) {
$context = RequestContext::getMain();
}
$langCode = $context->getLanguage()->getCode();
Method visualizeReferenceChanges
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function visualizeReferenceChanges(
$headerPrefix,
Diff $changes,
Snak $oldestMainSnak,
Snak $newestMainSnak
Method findImplicitUsages
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function findImplicitUsages( array $entityIds ): array {
$numericItemIds = [];
foreach ( $entityIds as $entityId ) {
if ( $entityId instanceof ItemId ) {
$numericItemIds[] = $entityId->getNumericId();
Method visualizeQualifierChanges
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function visualizeQualifierChanges(
$headerPrefix,
Diff $changes,
Snak $oldestMainSnak,
Snak $newestMainSnak
Method mergeItems
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function mergeItems(
ItemId $fromId,
ItemId $toId,
IContextSource $context,
array $ignoreConflicts = [],
Method formatRow
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function formatRow( EntityId $propertyId ) {
$title = $this->titleLookup->getTitleForId( $propertyId );
$language = $this->getLanguage();
if ( !$title->exists() ) {
Method onApiCheckCanExecute
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function onApiCheckCanExecute( ApiBase $module, User $user, &$message ) {
if ( $module instanceof ApiEditPage ) {
$params = $module->extractRequestParams();
$pageObj = $module->getTitleOrPageId( $params );
$namespace = $pageObj->getTitle()->getNamespace();
Method getAllowedParams
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getAllowedParams(): array {
return array_merge(
[
'statement' => [
ParamValidator::PARAM_TYPE => 'string',
Method deserialize
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function deserialize( string $siteId, array $serialization, string $basePath = '' ): SiteLink {
if ( !array_key_exists( 'title', $serialization ) ) {
throw new MissingFieldException( 'title', $basePath );
}
Method handleDescriptionsValidationError
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function handleDescriptionsValidationError( ValidationError $validationError ): void {
$context = $validationError->getContext();
switch ( $validationError->getCode() ) {
case DescriptionsSyntaxValidator::CODE_DESCRIPTIONS_NOT_ASSOCIATIVE:
Method updateQueryBuilder
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function updateQueryBuilder( SelectQueryBuilder $queryBuilder, array $entityIds, IReadableDatabase $db ) {
$where = [];
$joinSlotsTable = false;
foreach ( $entityIds as $entityId ) {
Method newDefinitionsFromConfigArray
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function newDefinitionsFromConfigArray( array $sourceConfig, SubEntityTypesMapper $subEntityTypesMapper ) {
$this->assertConfigArrayWellFormed( $sourceConfig );
$sources = [];
Method __construct
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
EntityContentFactory $contentFactory,
EntityTitleStoreLookup $entityTitleStoreLookup,
IdGenerator $idGenerator,
EntityIdComposer $entityIdComposer,
RevisionStore $revisionStore,
Method __construct
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string $title,
array $tags,
ChangeOpFactoryProvider $changeOpFactoryProvider,
SpecialPageCopyrightView $copyrightView,
SummaryFormatter $summaryFormatter,
Method __construct
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
array $tags,
SpecialPageCopyrightView $copyrightView,
SummaryFormatter $summaryFormatter,
EntityTitleLookup $entityTitleLookup,
MediaWikiEditEntityFactory $editEntityFactory,