Showing 1,432 of 2,096 total issues
Method addValue
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function addValue(
RdfWriter $writer,
$propertyValueNamespace,
$propertyValueLName,
$dataType,
Method doDBUpdates
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function doDBUpdates() {
if ( !WikibaseSettings::isRepoEnabled() ) {
$this->output( "You need to have Wikibase enabled in order to use this maintenance script!\n\n" );
exit;
}
Method newSuccessHttpResponse
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function newSuccessHttpResponse( CreatePropertyResponse $useCaseResponse ): Response {
$response = $this->getResponseFactory()->create();
$response->setStatus( 201 );
$response->setHeader( 'Content-Type', 'application/json' );
$response->setHeader(
Method validateAndDeserialize
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function validateAndDeserialize( PropertyDescriptionEditRequest $request ): Term {
$property = $this->propertyRetriever->getPropertyWriteModel( new NumericPropertyId( $request->getPropertyId() ) );
$language = $request->getLanguageCode();
$description = $request->getDescription();
Method validate
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function validate( array $statementSerialization, string $basePath = '' ): ?ValidationError {
try {
$this->deserializedStatement = $this->deserializer->deserialize( $statementSerialization, $basePath );
} catch ( MissingFieldException $e ) {
return new ValidationError(
Method newFromArray
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function newFromArray( array $wellKnownPropertyIds, ?LoggerInterface $logger = null ): self {
$logger = $logger ?: new NullLogger();
$referenceUrlPropertyId = self::parseWellKnownProperty( $wellKnownPropertyIds, 'referenceUrl', $logger );
$titlePropertyId = self::parseWellKnownProperty( $wellKnownPropertyIds, 'title', $logger );
Method getFormatter
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getFormatter( $dataValueType, $dataTypeId = null ): ValueFormatter {
$formatter = null;
if ( $dataTypeId !== null ) {
if ( isset( $this->formatters["PT:$dataTypeId"] ) ) {
Method loadEntityDataFromWikiPageRevision
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function loadEntityDataFromWikiPageRevision( RevisionRecord $revision, string $slotRole, int $revStoreFlags ) {
// NOTE: Support for cross-wiki content access in RevisionStore is incomplete when,
// reading from the pre-MCR database schema, see T201194.
// For that reason, we have to load and decode the content blob directly,
// instead of using RevisionRecord::getContent() or SlotRecord::getContent().
Consider simplifying this complex logical expression. Open
Open
if ( ( !structureEditorFactory || !structureEditorFactory.getAdder )
|| ( !messageProvider || !messageProvider.getMessage )
|| !Array.isArray( userLanguages )
|| ( vocabularyLookupApiUrl && typeof vocabularyLookupApiUrl !== 'string'
|| !commonsApiUrl )
Function _onSiteSelectorChangeHandler
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_onSiteSelectorChangeHandler: function () {
var apiUrl,
$page = $( '#wbclient-linkItem-page' );
$page.val( '' );
Function WbListviewListItemAdapter
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var SELF = $.wikibase.listview.ListItemAdapter = function WbListviewListItemAdapter( options ) {
if ( typeof options.listItemWidget !== 'function'
|| !options.listItemWidget.prototype.widgetName
|| !options.listItemWidget.prototype.widgetEventPrefix
) {
Function value
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
value: function ( value ) {
if ( value !== undefined ) {
this.option( 'value', value );
return;
}
Function fdbc
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/***/ (function(module, exports) {
// iterable DOM collections
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
module.exports = {
Method doQuery
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function doQuery( array $params ): ?IResultWrapper {
$pages = $this->getPageSet()->getGoodPages();
if ( !$pages ) {
return null;
}
Function actions
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function actions(metricTracker) {
return {
[STORE_INIT](context, guids) {
context.commit(SET_ALL_UNTAINTED, guids);
context.commit(SET_ALL_POPPERS_HIDDEN, guids);
Method doWikibaseHandleChange
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function doWikibaseHandleChange( Change $change ) {
if ( $this->sendEchoNotification !== true ) {
return false;
}
Method createSchema
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function createSchema(
Title $title,
$revisionTimestamp,
$entityConceptUri,
File $imageFile = null,
Method rebuildPropertyTerms
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function rebuildPropertyTerms( DatabaseUpdater $updater ) {
$localEntitySourceName = WikibaseRepo::getSettings()->getSetting( 'localEntitySourceName' );
$propertySource = WikibaseRepo::getEntitySourceDefinitions()
->getDatabaseSourceForEntityType( 'property' );
if ( $propertySource === null || $propertySource->getSourceName() !== $localEntitySourceName ) {
Method getEntityIds
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getEntityIds( array $sites, array $titles, $normalize ) {
$ids = [];
$numSites = count( $sites );
$numTitles = count( $titles );
Method showQuery
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function showQuery( array $query = [], $subPage = false ) {
$paging = false;
$out = $this->getOutput();
if ( $this->limit == 0 && $this->offset == 0 ) {