Showing 1,432 of 2,096 total issues
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
PatchPropertyValidator $validator,
AssertPropertyExists $assertPropertyExists,
AssertUserIsAuthorized $assertUserIsAuthorized,
PropertyRetriever $propertyRetriever,
PropertySerializer $propertySerializer,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
PatchItemValidator $validator,
AssertItemExists $assertItemExists,
AssertUserIsAuthorized $assertUserIsAuthorized,
ItemRetriever $itemRetriever,
ItemSerializer $itemSerializer,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
PatchItemAliasesValidator $useCaseValidator,
AssertItemExists $assertItemExists,
AssertUserIsAuthorized $assertUserIsAuthorized,
ItemAliasesRetriever $aliasesRetriever,
AliasesSerializer $aliasesSerializer,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
PropertyLabelsRetriever $labelsRetriever,
LabelsSerializer $labelsSerializer,
PatchJson $patcher,
PropertyWriteModelRetriever $propertyRetriever,
PropertyUpdater $propertyUpdater,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
TemplateFactory $templateFactory,
SiteList $sites,
EditSectionGenerator $sectionEditLinkGenerator,
EntityIdFormatter $entityIdFormatter,
LanguageNameLookup $languageNameLookup,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
AssertItemExists $assertItemExists,
ItemLabelsRetriever $labelsRetriever,
LabelsSerializer $labelsSerializer,
PatchJson $patcher,
PatchedItemLabelsValidator $patchedLabelsValidator,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
PatchItemDescriptionsValidator $requestValidator,
AssertItemExists $assertItemExists,
AssertUserIsAuthorized $assertUserIsAuthorized,
ItemDescriptionsRetriever $descriptionsRetriever,
DescriptionsSerializer $descriptionsSerializer,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
DatabaseEntitySource $localEntitySource,
StringNormalizer $stringNormalizer,
TypeIdsAcquirer $typeIdsAcquirer,
TypeIdsLookup $typeIdsLookup,
TypeIdsResolver $typeIdsResolver,
Function getListItemAdapterForSiteLinkView
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SELF.prototype.getListItemAdapterForSiteLinkView = function ( startEditingCallback, getAllowedSites, removeCallback ) {
var self = this;
return new $.wikibase.listview.ListItemAdapter( {
listItemWidget: $.wikibase.sitelinkview,
getNewItem: function ( value, dom ) {
Function getStatementGroupListView
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SELF.prototype.getStatementGroupListView = function ( startEditingCallback, entity, $statementgrouplistview, htmlIdPrefix ) {
var statementGroupSet = entity.getStatements();
function getStatementForGuid( guid ) {
var res = null;
Method render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function render(
EntityId $entityId,
$propertyLabelOrId,
array $acceptableRanks = null
) {
Method getTermsOfEntities
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getTermsOfEntities( array $entityIds, array $termTypes, string $languageCode ): array {
$this->termBuffer->prefetchTerms( $entityIds, $termTypes, [ $languageCode ] );
$terms = [];
foreach ( $entityIds as $entityId ) {
Method getTerm
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getTerm( EntityId $entityId, string $languageCode, string $termType ): ?string {
$resolutionResult = $this->redirectResolvingLatestRevisionLookup->lookupLatestRevisionResolvingRedirect( $entityId );
if ( $resolutionResult === null ) {
return null;
}
Method getTermsOfEntities
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getTermsOfEntities( array $entityIds, array $termTypes, string $languageCode ): array {
$this->termBuffer->prefetchTerms( $entityIds, $termTypes, [ $languageCode ] );
$terms = [];
foreach ( $entityIds as $entityId ) {
Method processArguments
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function processArguments( $subPage ) {
parent::processArguments( $subPage );
$request = $this->getRequest();
// explode the subpage from the format Special:SetSitelink/q123/enwiki
Method getMultiSelectForBadges
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getMultiSelectForBadges() {
$options = [];
$default = [];
/** @var ItemId[] $badgeItemIds */
Method getExamplesMessages
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getExamplesMessages(): array {
return [
"action=wbgetentities&ids=Q42"
=> "apihelp-wbgetentities-example-1",
"action=wbgetentities&ids=P17"
Method formatResult
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function formatResult( IResultWrapper $res, int $limit, array $props ): void {
$currentEntity = null;
$count = 0;
$result = $this->getResult();
$props = array_flip( $props );
Method validateDescriptionText
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function validateDescriptionText( string $descriptionText, string $language ): ?ValidationError {
$result = $this->termValidatorFactory
->getDescriptionValidator()
->validate( $descriptionText );
if ( !$result->isValid() ) {
Method deserialize
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function deserialize( string $dataTypeId, array $valueSerialization, string $basePath = '' ): DataValue {
$this->assertFieldExists( $valueSerialization, 'content', $basePath );
// phpcs:ignore Generic.CodeAnalysis.AssignmentInCondition.Found
switch ( $dataValueType = $this->valueTypeLookup->getValueType( $dataTypeId ) ) {