Showing 4,652 of 306,333 total issues
Function addRelatedRecord
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
addRelatedRecord: function (element, callback) {
let aDeferred = jQuery.Deferred();
let referenceModuleName = this.moduleName;
let parentId = this.getParentId();
let parentModule = this.parentModuleName;
- 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 reloadAfterSave
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
reloadAfterSave: function (responseData, params, form, element) {
if (responseData.skipReload) {
return;
}
const moduleName = params['module'];
- 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 import
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function import($zipfile, $overwrite = false)
{
$module = $this->getModuleNameFromZip($zipfile);
if (null !== $module) {
$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 update
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function update($moduleInstance, $zipfile, $overwrite = true)
{
$module = $this->getModuleNameFromZip($zipfile);
if (null !== $module) {
$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 process
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function process(): void
{
\App\Utils\ConfReport::saveEnv();
$this->status = 1;
$errorsText = '<br>';
- 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 validSearchParams
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public static function validSearchParams(string $moduleName, array $searchParams, $convert = true): array
{
$searchParamsCount = \count($searchParams);
if ($searchParamsCount > 2) {
throw new Exceptions\IllegalValue("ERR_NUMBER_OF_ARGUMENTS_NOT_ALLOWED||{$searchParamsCount}|| > 2||" . Utils::varExport($searchParams, true), 406);
- 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 getBrowserInfo
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public static function getBrowserInfo(): object
{
if (empty(self::$browserCache)) {
$browserAgent = strtolower(\App\Request::_getServer('HTTP_USER_AGENT', ''));
- 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 getWarnings
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public static function getWarnings($folders, $active = true)
{
if (empty($folders)) {
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 getRelatedRecords
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public static function getRelatedRecords($record, $hierarchy)
{
$moduleName = Record::getType($record);
$records = $recordsLevel1 = $recordsLevel2 = [];
if (\in_array(0, $hierarchy)) {
- 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 getEmployeeHierarchy
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function getEmployeeHierarchy($id)
{
\App\Log::trace('Entering getEmployeeHierarchy(' . $id . ') method ...');
$listViewHeader = [];
- 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 getHierarchyData
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function getHierarchyData($id, $baseInfo, $recordId, &$listviewEntries, $getRawData = false, $getLinks = true)
{
$moduleName = 'Partners';
$currentUser = \App\User::getCurrentUserModel();
$hasRecordViewAccess = $currentUser->isAdmin() || \App\Privilege::isPermitted($moduleName, 'DetailView', $recordId);
- 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 getHierarchyData
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function getHierarchyData($id, $baseInfo, $recordId, &$listviewEntries, $getRawData = false, $getLinks = true)
{
\App\Log::trace('Entering getHierarchyData(' . $id . ',' . $recordId . ') method ...');
$currentUser = Users_Privileges_Model::getCurrentUserModel();
$hasRecordViewAccess = $currentUser->isAdminUser() || \App\Privilege::isPermitted('MultiCompany', 'DetailView', $recordId);
- 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 getHierarchyData
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function getHierarchyData($id, $baseInfo, $recordId, &$listviewEntries, $getRawData = false, $getLinks = true)
{
\App\Log::trace('Entering getHierarchyData(' . $id . ',' . $recordId . ') method ...');
$currentUser = Users_Privileges_Model::getCurrentUserModel();
$hasRecordViewAccess = $currentUser->isAdminUser() || \App\Privilege::isPermitted('Competition', 'DetailView', $recordId);
- 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 getHierarchyData
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function getHierarchyData($id, $salesProcessesInfoBase, $salesProcessesId, &$listviewEntries, $getRawData = false, $getLinks = true)
{
\App\Log::trace('Entering getHierarchyData(' . $id . ',' . $salesProcessesId . ') method ...');
$currentUser = Users_Privileges_Model::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 performTasks
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
private function performTasks(App\EventHandler $eventHandler, $condition = [])
{
$recordModel = $eventHandler->getRecordModel();
$moduleName = $eventHandler->getModuleName();
if (!isset($this->workflows[$moduleName])) {
- 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 initializeListViewContents
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function initializeListViewContents(App\Request $request, Vtiger_Viewer $viewer)
{
$moduleName = $request->getModule();
$pageNumber = $request->getInteger('page');
$orderBy = $request->getArray('orderby', \App\Purifier::STANDARD, [], \App\Purifier::SQL);
- 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 getStructure
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function getStructure(Vtiger_Record_Model $recordModel, App\Request $request): array
{
Vtiger_Field_Model::$tabIndexDefaultSeq = 1000;
$values = [];
$moduleModel = $recordModel->getModule();
- 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 getHierarchyData
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function getHierarchyData($id, $iStorageInfoBase, $iStorageId, &$listviewEntries, $getRawData = false, $getLinks = true)
{
\App\Log::trace('Entering getHierarchyData(' . $id . ',' . $iStorageId . ') method ...');
$hasRecordViewAccess = \App\Privilege::isPermitted('IStorages', 'DetailView', $iStorageId);
- 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 getRecordDataFromXMLTemplate
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function getRecordDataFromXMLTemplate(XMLReader $xmlToImport)
{
$recordData = [];
$recordNum = 0;
$firstElement = '';
- 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 getHierarchyData
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function getHierarchyData(int $id, array $baseInfo, int $recordId, array &$listviewEntries, bool $getRawData = false, bool $getLinks = true): array
{
\App\Log::trace('Entering getHierarchyData(' . $id . ',' . $recordId . ') method ...');
$currentUser = Users_Privileges_Model::getCurrentUserModel();
$hasRecordViewAccess = $currentUser->isAdminUser() || \App\Privilege::isPermitted('HelpDesk', 'DetailView', $recordId);
- 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"