Showing 428 of 1,426 total issues
Function _fnBrowserDetect
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnBrowserDetect( settings )
{
// We don't need to do this every time DataTables is constructed, the values
// calculated are specific to the browser and OS configuration which we
// don't expect to change between initialisations
Function on
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function on( elem, types, selector, data, fn, one ) {
var origFn, type;
// Types can be a map of types/handlers
if ( typeof types === "object" ) {
Function toggleClass
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toggleClass: function( value, stateVal ) {
var type = typeof value,
isValidValue = type === "string" || Array.isArray( value );
if ( typeof stateVal === "boolean" && isValidValue ) {
Function adjustCSS
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function adjustCSS( elem, prop, valueParts, tween ) {
var adjusted, scale,
maxIterations = 20,
currentValue = tween ?
function() {
Function fetchData
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var fetchData = function (data, type, src) {
var arrayNotation, funcNotation, out, innerSrc;
if ( src !== "" )
{
Function execute
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): void
{
$helper = $this->getHelper('question');
$question = new ConfirmationQuestion('Continue with cleaning the read models? ', false);
- 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 _fnInvalidate
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnInvalidate( settings, rowIdx, src, colIdx )
{
var row = settings.aoData[ rowIdx ];
var i, ien;
var cellWrite = function ( cell, col ) {
Function _fnFeatureHtmlLength
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnFeatureHtmlLength ( settings )
{
var
classes = settings.oClasses,
tableId = settings.sTableId,
Function dispatch
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
dispatch: function( nativeEvent ) {
// Make a writable jQuery.Event from the native event object
var event = jQuery.event.fix( nativeEvent );
Method add
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function add(Request $request): Response
{
$form = $this->createQuestionForm(null);
$form->handleRequest($request);
Method updateQuestionFromData
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateQuestionFromData(
UuidFactoryInterface $uuidFactory,
Question $question,
array $data
): Question {
Function ajaxHandleResponses
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ajaxHandleResponses( s, jqXHR, responses ) {
var ct, type, finalDataType, firstDataType,
contents = s.contents,
dataTypes = s.dataTypes;
Function slugify
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function slugify(text) {
text = text.toString().toLowerCase().trim();
const sets = [
{to: 'a', from: '[ÀÁÂÃÄÅÆĀĂĄẠẢẤẦẨẪẬẮẰẲẴẶ]'},
Method registerIframe
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function registerIframe(Request $request): Response
{
if (!$this->canRegister()) {
return new Response('', Response::HTTP_FORBIDDEN);
}
Method normalize
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function normalize($quiz, $format = null, array $context = []): array
{
$questions = array_map(
function (Question $question) use ($format) {
return $this->questionNormalizer->normalize(
Method register
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function register(Request $request): Response
{
if (!$this->canRegister()) {
return new Response('', Response::HTTP_FORBIDDEN);
}
Method getDetailedTopScoreAverages
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getDetailedTopScoreAverages(): array
{
$averages = [];
foreach ($this->statisticsKeys as $statisticsKey) {
Function boxModelAdjustment
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
var i = dimension === "width" ? 1 : 0,
extra = 0,
delta = 0;
Function mightThrow
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
mightThrow = function() {
var returned, then;
// Support: Promises/A+ section 2.3.3.3.3
// https://promisesaplus.com/#point-59
Method configure
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function configure(): void
{
$this
->setName('gvq:replay')
->setDescription('Replay all current events.')