Showing 1,432 of 2,096 total issues
Function show
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
show: function () {
var self = this;
// eslint-disable-next-line no-jquery/no-sizzle
if ( this._tipsy.$tip && this._tipsy.$tip.is( ':visible' ) ) {
Function show
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
show: function () {
var self = this;
// eslint-disable-next-line no-jquery/no-sizzle
if ( this._tipsy.$tip && this._tipsy.$tip.is( ':visible' ) ) {
Function _create
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function () {
var self = this,
widgetName = this.widgetName,
$menu = this._buildMenu().appendTo( document.body ).hide();
Method getRevisionHeader
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRevisionHeader( RevisionRecord $rev, $complete = '' ) {
//NOTE: This must be kept in sync with the parent implementation.
// Perhaps some parts could be factored out to reduce code duplication.
$lang = $this->getLanguage();
Method createOrUpdate
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createOrUpdate(
EntityDocument $entity,
EditMetadata $editMetadata,
int $newOrUpdateFlag
): EntityRevision {
Method validateAndDeserialize
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function validateAndDeserialize( ItemLabelEditRequest $request ): Term {
$item = $this->itemRetriever->getItemWriteModel( new ItemId( $request->getItemId() ) );
$language = $request->getLanguageCode();
$label = $request->getLabel();
Method insertNonExistingRecords
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function insertNonExistingRecords(
array $records,
?callable $recordsToInsertDecoratorCallback = null
): array {
if ( !$records ) {
Function makeLocalContext
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function makeLocalContext (store, namespace, path) {
var noNamespace = namespace === '';
var local = {
dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
Method visualizeClaimChange
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function visualizeClaimChange(
ClaimDifference $claimDifference,
Statement $baseStatement,
array $path = []
) {
Method getEntitySerializationWithMetaData
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getEntitySerializationWithMetaData( array $serialization ) {
$serializeEmptyListsAsObjects = WikibaseRepo::getSettings()->getSetting( 'tmpSerializeEmptyListsAsObjects' );
$modifications = [];
$makeIdKvpCallback = $this->callbackFactory->getCallbackToSetArrayType( 'kvp', 'id' );
Method getAllowedParams
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getAllowedParams(): array {
return [
'search' => [
ParamValidator::PARAM_TYPE => 'string',
ParamValidator::PARAM_REQUIRED => true,
Method addSiteLinks
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function addSiteLinks( Item $item ) {
$id = $item->getId();
$entityLName = $this->vocabulary->getEntityLName( $id );
$entityRepoName = $this->vocabulary->getEntityRepositoryName( $id );
Method execute
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
if ( !WikibaseSettings::isRepoEnabled() ) {
$this->fatalError( "You need to have Wikibase enabled in order to use this maintenance script!\n" );
}
Method validateAndDeserialize
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function validateAndDeserialize( ItemDescriptionEditRequest $request ): Term {
$item = $this->itemRetriever->getItemWriteModel( new ItemId( $request->getItemId() ) );
$language = $request->getLanguageCode();
$description = $request->getDescription();
Method validateModifiedStatements
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function validateModifiedStatements(
array $originalSerialization,
StatementList $originalStatements,
array $serialization,
string $basePath = ''
Consider simplifying this complex logical expression. Open
Open
if ( !isset( $matches['year'] )
|| ( isset( $matches['day'] ) && !isset( $matches['month'] ) )
|| ( isset( $matches['hour'] ) && !isset( $matches['day'] ) )
|| ( isset( $matches['minute'] ) && !isset( $matches['hour'] ) )
|| ( isset( $matches['second'] ) && !isset( $matches['minute'] ) )
Function _combineResults
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_combineResults: function ( hookResults, searchResults ) {
var self = this,
deferred = $.Deferred(),
ids = {},
result = [],
Method showConfirmationForm
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function showConfirmationForm( int $autoSummaryLength, int $undidRevision = 0 ): void {
$req = $this->getRequest();
$args = [
'action' => 'submit',
Method switchForm
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function switchForm( ?string $languageCode, ?string $label ): void {
$formDescriptor = [
'language' => [
'name' => 'language',
'default' => $languageCode ?: '',
Method attemptSaveEntity
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function attemptSaveEntity(
EntityDocument $entity,
$summary,
array $requestParams,
IContextSource $context,