Showing 4,652 of 306,333 total issues
File Widget.php
has 479 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 _request
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
_request: function (params, pjaxMode, rawData) {
const aDeferred = jQuery.Deferred();
if (typeof rawData === 'undefined') {
rawData = 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 checkZip
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
public function checkZip($zipfile)
{
$manifestFound = $languagefile_found = $layoutfile_found = $updatefile_found = $extensionfile_found = $moduleVersionFound = $fontfile_found = false;
$moduleName = null;
$zip = \App\Zip::openFile($zipfile, ['checkFiles' => 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 addReport
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
public static function addReport(array $data): string
{
$status = 0;
if (\Config\Components\Mail::$rcListAcceptAutomatically ?? false) {
$status = 1;
- 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 getFieldValue
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
public function getFieldValue(string $magentoFieldName, ?string $crmFieldName = null)
{
$parsedFieldName = $crmFieldName ?? $this->getFieldNameCrm($magentoFieldName);
$methodName = 'getCrm' . \ucfirst($parsedFieldName);
$fieldLevels = explode('|', $magentoFieldName);
- 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 save
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
public function save()
{
$db = App\Db::getInstance();
$profileName = $this->get('profilename');
$description = $this->get('description');
- 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 DetailView.php
has 475 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 Mailer.php
has 472 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App;
/**
Function populateSharingPrivileges
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
public static function populateSharingPrivileges($enttype, $userId, $module, $pertype, $varArr = false)
{
$tabId = Module::getModuleId($module);
$dbCommand = \App\Db::getInstance()->createCommand();
if (empty($varArr)) {
- 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 populateRelatedSharingPrivileges
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
public static function populateRelatedSharingPrivileges($enttype, $userId, $module, $relmodule, $pertype, $varArr = false)
{
$dbCommand = \App\Db::getInstance()->createCommand();
$tabId = Module::getModuleId($module);
$relTabId = Module::getModuleId($relmodule);
- 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 getValueFromImport
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
public function getValueFromImport($value, $defaultValue = null)
{
if (empty($value)) {
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
PackageImport
has 51 functions (exceeds 20 allowed). Consider refactoring. Open
class PackageImport extends PackageExport
{
/**
* Module Meta XML File (Parsed).
*/
File Functions.php
has 464 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
Function parseBaseSearchParamsToCondition
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
public function parseBaseSearchParamsToCondition($searchParams)
{
if (empty($searchParams)) {
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 sendByRowQueue
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
public static function sendByRowQueue($rowQueue)
{
if ('demo' === \App\Config::main('systemMode')) {
return true;
}
- 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 saveHandler
has 177 lines of code (exceeds 25 allowed). Consider refactoring. Open
let saveHandler = function (e) {
thisInstance.registerNameAjaxEditEvent();
let element = $(e.target);
if ($(e.currentTarget).find('.dateTimePickerField').length) {
if (element.closest('.drp-calendar').length || element.hasClass('drp-calendar')) {
File Privilege.php
has 459 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App;
/**
File Import.js
has 458 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.
Method getRecordRelatedListViewLinksLeftSide
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getRecordRelatedListViewLinksLeftSide(Vtiger_RelationListView_Model $viewModel)
{
$links = [];
if (!$this->isViewable()) {
return [];
Function process
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
public function process(): string
{
$html = '';
$moduleName = 'SSalesProcesses';
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"