Showing 428 of 1,426 total issues
Function Button
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Button = function ($$$1) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
File QuestionViewController.php
has 339 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types=1);
namespace VSV\GVQ_API\Question\Controllers;
use Ramsey\Uuid\UuidFactoryInterface;
Function _fnFeatureHtmlTable
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnFeatureHtmlTable ( settings )
{
var table = $(settings.nTable);
// Add the ARIA grid role to the table
Function then
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
then: function( onFulfilled, onRejected, onProgress ) {
var maxDepth = 0;
function resolve( depth, deferred, handler, special ) {
return function() {
var that = this,
Function _fnDraw
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnDraw( oSettings )
{
/* Provide a pre-callback function which can be used to cancel the draw is false is returned */
var aPreDraw = _fnCallbackFire( oSettings, 'aoPreDrawCallback', 'preDraw', [oSettings] );
if ( $.inArray( false, aPreDraw ) !== -1 )
Method buildForm
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function buildForm(FormBuilderInterface $builder, array $options)
{
/** @var TranslatorInterface $translator */
$translator = $options['translator'];
Function Animation
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Animation( elem, properties, options ) {
var result,
stopped,
index = 0,
length = Animation.prefilters.length,
Function trigger
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
trigger: function( event, data, elem, onlyHandlers ) {
var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
eventPath = [ elem || document ],
type = hasOwn.call( event, "type" ) ? event.type : event,
Function Util
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Util = function ($$$1) {
/**
* ------------------------------------------------------------------------
* Private TransitionEnd Helpers
* ------------------------------------------------------------------------
Function _fnBuildAjax
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnBuildAjax( oSettings, data, fn )
{
// Compatibility with 1.9-, allow fnServerData and event to manipulate
_fnCallbackFire( oSettings, 'aoServerParams', 'serverParams', [data] );
Function Popover
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function (_Tooltip) {
_inheritsLoose(Popover, _Tooltip);
function Popover() {
return _Tooltip.apply(this, arguments) || this;
Function bootstrap
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) {
var api = new DataTable.Api( settings );
var classes = settings.oClasses;
var lang = settings.oLanguage.oPaginate;
var aria = settings.oLanguage.oAria.paginate || {};
Function _fnColumnOptions
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnColumnOptions( oSettings, iCol, oOptions )
{
var oCol = oSettings.aoColumns[ iCol ];
var oClasses = oSettings.oClasses;
var th = $(oCol.nTh);
Function _fnGetObjectDataFn
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnGetObjectDataFn( mSource )
{
if ( $.isPlainObject( mSource ) )
{
/* Build an object of get functions, and wrap them in a single call */
Method handle
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(DomainMessage $domainMessage)
{
$payload = $domainMessage->getPayload();
if ($payload instanceof EmailRegistered) {
Function initServer
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
BootstrapTable.prototype.initServer = function (silent, query, url) {
var that = this,
data = {},
index = $.inArray(this.options.sortName, this.header.fields),
params = {
Function Sizzle
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Sizzle( selector, context, results, seed ) {
var m, i, elem, nid, match, groups, newSelector,
newContext = context && context.ownerDocument,
// nodeType defaults to 9, since context defaults to document
Function CHILD
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
"CHILD": function( type, what, argument, first, last ) {
var simple = type.slice( 0, 3 ) !== "nth",
forward = type.slice( -4 ) !== "last",
ofType = what === "of-type";
Function _
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_: function ( settings, host, idx, buttons, page, pages ) {
var classes = settings.oClasses;
var lang = settings.oLanguage.oPaginate;
var aria = settings.oLanguage.oAria.paginate || {};
var btnDisplay, btnClass, counter=0;
Function execute
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): void
{
$firstId = $input->getOption('first-id');
if (null !== $firstId) {
$firstId = (int) $firstId;
- 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"