Showing 4,652 of 306,333 total issues
Function testIfAllOperatorsExist
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function testIfAllOperatorsExist()
{
foreach ((new \DirectoryIterator(ROOT_DIRECTORY . '/modules/Vtiger/uitypes/')) as $item) {
if ($item->isFile() && 'php' === $item->getExtension()) {
$fileName = $item->getBasename('.php');
- 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 getModules
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public static function getModules(): array
{
$cacheName = 'InterestsConflict::getModules';
if (\App\Cache::has($cacheName, '')) {
return \App\Cache::get($cacheName, '');
- 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 translate
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public static function translate(string $key, string $moduleName = '_Base', ?string $language = null, bool $encode = true, ?string $secondModuleName = null)
{
if (empty($key)) { // nothing to translate
return $key;
}
- 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 checkIfDuplicateRecordExists
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function checkIfDuplicateRecordExists()
{
if ($this->get('check_duplicate') && isset($this->fieldMapping['field_merge'][$this->destinyModuleModel->getId()])) {
$referenceDestinyField = $this->fieldMapping['field_merge'][$this->destinyModuleModel->getId()];
if ($referenceDestinyField) {
- 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 getArray
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function getArray($key, $type = false, $value = [], ?string $keyType = null)
{
if (isset($this->purifiedValuesByArray[$key])) {
return $this->purifiedValuesByArray[$key];
}
- 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 27 (exceeds 5 allowed). Consider refactoring. Open
public function process()
{
if (!$this->textParser->recordModel || !$this->textParser->recordModel->getModule()->isInventory()) {
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 initializeListViewContents
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function initializeListViewContents(App\Request $request, Vtiger_Viewer $viewer)
{
$moduleName = $request->getModule();
$cvId = $request->getByType('viewname', 2);
$pageNumber = $request->getInteger('page');
- 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 global
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function global(App\Request $request)
{
$moduleName = $request->getModule(false);
$data = [];
$type = 'global';
- 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 getStats
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function getStats($data, $langBase, $byModule)
{
$differences = [];
$i = 0;
foreach ($data as $id => $dataLang) {
- 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 getHeaders
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function getHeaders()
{
$fields = [];
if ($this->get('viewId')) {
$moduleModel = $this->getRelationModel()->getRelationModuleModel();
- 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 getAutoCompleteField
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function getAutoCompleteField($recordModel): array
{
$fields = [];
$fieldsReferenceList = [];
$excludedModules = ['Users'];
- 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 Index.js
has 329 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';
$.Class(
'Settings_RecordNumbering_Index_Js',
File User.php
has 329 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App;
/**
File Record.php
has 329 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 getPopUp
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
getPopUp(container) {
if (typeof container === 'undefined') {
container = this.getContainer();
}
container.on('click', '.getPopupUi', (e) => {
Function registerParams
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
registerParams(selectElement, params) {
if (typeof params.dropdownParent === 'undefined') {
const modalParent = $(selectElement).closest('.modal-body');
if (modalParent.length) {
params.dropdownParent = modalParent;
File Watchdog.php
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Watching Model Class.
*
Function registerConfirmations
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
registerConfirmations: function (container) {
let form = container.find('.js-filter-form');
App.Fields.Date.registerRange(form);
let table = $('#js-confirm-table');
if (table.hasClass('dataTable')) {
Method maximumFieldsLength
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function maximumFieldsLength(array $conditions = []): array
{
$typesNotSupported = ['datetime', 'date', 'year', 'timestamp', 'time'];
$uiTypeNotSupported = [30];
$updated = $requiresVerification = $typeNotFound = $notSupported = 0;
Method initMailPart
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected static function initMailPart($mbox, $mail, $partStructure, $partNum)
{
if ($partNum) {
\App\Log::beginProfile(__METHOD__ . '|imap_fetchbody', 'Mail|IMAP');
$data = $orgData = imap_fetchbody($mbox, $mail['id'], $partNum, FT_UID | FT_PEEK);