Showing 1,432 of 2,096 total issues
Function createEntityView
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createEntityView( entity, $entityview ) {
var currentRevision, revisionStore, entityChangersFactory,
viewFactoryArguments, ViewFactoryFactory, viewFactory, entityView,
repoConfig = mw.config.get( 'wbRepo' ),
repoApiUrl = repoConfig.url + repoConfig.scriptPath + '/api.php',
Function hydrateLanguageLabelInputForm
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
var hydrateLanguageLabelInputForm = function () {
var $lang, fields, fieldCount, langWidget;
$lang = $( document.getElementsByName( 'lang' ) ).closest( '.oo-ui-inputWidget' );
if ( $lang.length === 0 ) {
Function coalesceRuns
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
private function coalesceRuns( EntityId $entityId, array $changes ) {
$coalesced = [];
$currentRun = [];
$currentUser = null;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function handleRequest
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function handleRequest( $doc, WebRequest $request, OutputPage $output ) {
// No matter what: The response is always public
$output->getRequest()->response()->header( 'Access-Control-Allow-Origin: *' );
$revision = 0;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function stringParse
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
protected function stringParse( $value ) {
$date = $this->parseDate( $value );
$precision = TimeValue::PRECISION_YEAR;
$time = [ $this->parseFormattedNumber( $date['year'] ), 0, 0, 0, 0, 0 ];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getFormFields
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getFormFields(): array {
$formFields = [
self::FIELD_LANG => [
'name' => self::FIELD_LANG,
'class' => HTMLContentLanguageField::class,
File CachingPrefetchingTermLookup.php
has 301 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare( strict_types = 1 );
namespace Wikibase\Lib\Store;
File HtmlPageLinkRendererEndHookHandler.php
has 300 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare( strict_types = 1 );
namespace Wikibase\Repo\Hooks;
File WikiPageEntityStore.php
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Wikibase\Repo\Store\Sql;
use InvalidArgumentException;
Function validateModifiedStatements
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function validateModifiedStatements(
array $originalSerialization,
StatementList $originalStatements,
array $serialization,
string $basePath = ''
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
EditEntity
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class EditEntity extends ModifyEntity {
public const PARAM_DATA = 'data';
public const PARAM_CLEAR = 'clear';
Item
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class Item implements
StatementListProvidingEntity,
FingerprintProvider,
StatementListHolder,
LabelsProvider,
Function 7dd0
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__("23e7");
Function exports
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File ChangeLineFormatter.php
has 288 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare( strict_types = 1 );
namespace Wikibase\Client\RecentChanges;
File SqlStore.php
has 286 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Wikibase\Repo\Store\Sql;
use MediaWiki\HookContainer\HookContainer;
File jquery.ui.ooMenu.js
has 285 lines of code (exceeds 250 allowed). Consider refactoring. Open
( function () {
'use strict';
/**
* jQuery.ui.ooMenu provides an object-oriented menu structure. Menu items are managed using
File EntityUsageTable.php
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare( strict_types = 1 );
namespace Wikibase\Client\Usage\Sql;
Method getForm
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getForm( EntityDocument $entity = null ) {
if ( $this->page === null ) {
$this->page = $this->site === null ? '' : $this->getSiteLink( $entity, $this->site );
}
if ( !$this->badges ) {
File templates.php
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Wikibase;
/**