Showing 4,652 of 306,333 total issues
Function getRelatedVariable
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function getRelatedVariable($fieldType = false, $skipEmpty = false)
{
$cacheKey = "{$this->moduleName}|$fieldType|{$skipEmpty}";
if (isset(static::$relatedVariable[$cacheKey])) {
return static::$relatedVariable[$cacheKey];
- 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 clear
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public static function clear(): void
{
if ('TEST' === getenv('INSTALL_MODE')) {
return;
}
- 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 process
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function process(): string
{
$html = '';
$moduleName = $this->params[0];
if (!empty($textParserParams = $this->textParser->getParam('textParserParams')) && isset($textParserParams['userId'])) {
- 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 getQuickCreateModules
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public static function getQuickCreateModules($restrictList = false, $tree = false): array
{
$restrictListString = $restrictList ? 1 : 0;
if ($tree) {
$userModel = \App\User::getCurrentUserModel();
- 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 importDataFromXML
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function importDataFromXML($uploadedXml)
{
$combine = ['tabid' => 'source', 'reltabid' => 'target'];
$instances = [];
$i = 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 queueScheduledWorkflowTasks
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function queueScheduledWorkflowTasks()
{
$default_timezone = App\Config::main('default_timezone');
$vtWorflowManager = new VTWorkflowManager();
$taskQueue = new VTTaskQueue();
- 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 entityAfterSave
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function entityAfterSave(App\EventHandler $eventHandler)
{
if (!ModTracker::isTrackingEnabledForModule($eventHandler->getModuleName())) {
return 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 process
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function process()
{
$limit = App\Config::performance('CRON_MAX_NUMBERS_RECORD_PRIVILEGES_UPDATER');
$query = (new \App\Db\Query())->select(['crmid', 'setype'])
->from('vtiger_crmentity')
- 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 registerMiniListWidget
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
registerMiniListWidget: function () {
const thisInstance = this;
$('.dashboardHeading')
.off('click', '.js-add-filter')
.on('click', '.js-add-filter', function (e) {
Function registerCalendar
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
registerCalendar: function () {
const self = this,
container = this.getContainer();
//Default time format
let userTimeFormat = CONFIG.hourFormat;
Method getRecordListViewLinksLeftSide
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getRecordListViewLinksLeftSide()
{
if (!$this->isViewable()) {
return [];
}
File Menu.js
has 369 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* {[The file is published on the basis of YetiForce Public License 6.5 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */
'use strict';
jQuery.Class(
'Settings_Menu_Index_Js',
MultiImage
has 37 functions (exceeds 20 allowed). Consider refactoring. Open
class MultiImage {
/**
* Create class instance
*
* @param {HTMLElement|jQuery} inputElement - input type file element inside component
User
has 37 functions (exceeds 20 allowed). Consider refactoring. Open
class User
{
protected static $currentUserId;
protected static $currentUserRealId = false;
protected static $currentUserCache = false;
Settings_Profiles_Record_Model
has 37 functions (exceeds 20 allowed). Consider refactoring. Open
class Settings_Profiles_Record_Model extends Settings_Vtiger_Record_Model
{
/**
* Profile field inactive.
*
Vtiger_Detail_View
has 37 functions (exceeds 20 allowed). Consider refactoring. Open
class Vtiger_Detail_View extends Vtiger_Index_View
{
use \App\Controller\ExposeMethod;
/** @var Vtiger_DetailView_Model Record model instance. */
File Coordinate.php
has 368 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Coordiante model.
*
File Vtiger.js
has 367 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*+***********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
File Index.js
has 366 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* {[The file is published on the basis of YetiForce Public License 6.5 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */
'use strict';
window.Settings_Picklist_Index_Js = class {
/**
Method getParentRecord
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getParentRecord($record, $moduleName = false, $type = 1, $actionid = false)
{
$cacheKey = "$record,$moduleName,$type,$actionid";
if (\App\Cache::staticHas('PrivilegesParentRecord', $cacheKey)) {
return \App\Cache::staticGet('PrivilegesParentRecord', $cacheKey);