Showing 4,652 of 306,333 total issues
Function updateTables
has a Cognitive Complexity of 150 (exceeds 5 allowed). Consider refactoring. Open
public function updateTables(Base $importer)
{
$this->logs .= "> start update tables ({$importer->dbType})\n";
$startMain = microtime(true);
$schema = $importer->db->getSchema();
- 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 Chat.php
has 1168 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Chat file.
*
Function checkPermission
has a Cognitive Complexity of 131 (exceeds 5 allowed). Consider refactoring. Open
public static function checkPermission($moduleName, $actionName = null, $record = false, $userId = false)
{
\App\Log::trace("Entering isPermitted($moduleName,$actionName,$record,$userId) method ...");
if (!$userId) {
$userId = \App\User::getCurrentUserId();
- 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 getAllByType
has a Cognitive Complexity of 122 (exceeds 5 allowed). Consider refactoring. Open
public static function getAllByType($tabid, $type = false, $parameters = false)
{
if (\App\Cache::has('AllLinks', 'ByType')) {
$rows = \App\Cache::get('AllLinks', 'ByType');
} else {
- 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 Detail.php
has 984 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/* +***********************************************************************************
* 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
File PackageImport.php
has 980 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/* +**********************************************************************************
* 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
`` has 119 functions (exceeds 20 allowed). Consider refactoring. Open
{
form: false,
discount: false,
tax: false,
inventoryContainer: false,
app
has 119 functions (exceeds 20 allowed). Consider refactoring. Open
const app = (window.app = {
/**
* variable stores client side language strings
*/
languageString: [],
File File.php
has 930 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Tool file for the field type `File`.
*
* @package App
Function importRecords
has a Cognitive Complexity of 111 (exceeds 5 allowed). Consider refactoring. Open
public function importRecords()
{
$moduleName = $this->module;
$tableName = Import_Module_Model::getDbTableName($this->user);
- 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 checkCondition
has a Cognitive Complexity of 110 (exceeds 5 allowed). Consider refactoring. Open
public function checkCondition(Vtiger_Record_Model $recordModel, $cond, Vtiger_Record_Model $referredRecordModel = null)
{
$condition = $cond['operation'];
$fieldInstance = $recordModel->getModule()->getFieldByName($cond['fieldname']);
if (empty($condition) || false === $fieldInstance) {
- 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 QueryGenerator.php
has 903 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Query generator file.
*
* @package App
Method getUserModuleSharingObjects
has 432 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getUserModuleSharingObjects($module, $userid, $defOrgShare, $currentUserRoles, $parentRoles, $currentUserGroups)
{
$modTabId = Module::getModuleId($module);
$modShareWritePermission = $modShareReadPermission = ['ROLE' => [], 'GROUP' => []];
$modDefOrgShare = null;
File Module.php
has 881 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/* +***********************************************************************************
* 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
Function operationsAfterPicklistDelete
has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring. Open
public function operationsAfterPicklistDelete($entityData)
{
$dbCommand = App\Db::getInstance()->createCommand();
$pickListFieldName = $entityData['fieldname'];
$valueToDelete = $entityData['valuetodelete'];
- 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 jstree.checkbox.js
has 848 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]} */
/*globals jQuery, define, exports, require, document */
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
File AdvanceFilter.js
has 845 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 Map.js
has 839 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(
'OpenStreetMap_Map_Js',
Function saveModulePermissions
has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring. Open
protected function saveModulePermissions($moduleModel, $permissions)
{
$db = \App\Db::getInstance();
$dbCommand = $db->createCommand();
$profileId = $this->getId();
- 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 checkCondition
has 377 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function checkCondition(Vtiger_Record_Model $recordModel, $cond, Vtiger_Record_Model $referredRecordModel = null)
{
$condition = $cond['operation'];
$fieldInstance = $recordModel->getModule()->getFieldByName($cond['fieldname']);
if (empty($condition) || false === $fieldInstance) {