Showing 4,652 of 306,333 total issues
Function initMailPart
has a Cognitive Complexity of 60 (exceeds 5 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);
- 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 getComposeParam
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
public static function getComposeParam(App\Request $request)
{
$moduleName = $request->getByType('crmModule');
$record = $request->getInteger('crmRecord');
$type = $request->getByType('type');
- 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 getFieldsStructure
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
public function getFieldsStructure(array $block): array
{
$fields = [];
foreach ($block['fields'] as $field) {
if (\is_array($field) && 'relatedField' === $field['type']) {
- 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 autoLink
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
autoLink() {
let fillChar = '\u200B';
let sel = window.getSelection(),
range = sel.getRangeAt(0).cloneRange(),
offset,
- 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 59 (exceeds 5 allowed). Consider refactoring. Open
public function save(App\Request $request)
{
$workflowId = !$request->isEmpty('for_workflow') ? $request->getInteger('for_workflow') : 0;
if (!empty($workflowId)) {
$record = !$request->isEmpty('task_id') ? $request->getInteger('task_id') : 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
Chat
has 63 functions (exceeds 20 allowed). Consider refactoring. Open
final class Chat
{
/**
* Information about allowed types of rooms.
*/
Function isPermitted
has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring. Open
public static function isPermitted(string $moduleName, $actionName = null, $record = false, $userId = false)
{
if (!$userId) {
$user = \App\User::getCurrentUserModel();
} 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 RelationListView.php
has 543 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
`` has 62 functions (exceeds 20 allowed). Consider refactoring. Open
{
container: false,
plotContainer: false,
chartInstance: false,
chartData: [],
Vtiger_ChartFilter_Model
has 62 functions (exceeds 20 allowed). Consider refactoring. Open
class Vtiger_ChartFilter_Model extends \App\Base
{
/**
* Widget model.
*
Function ajaxEditHandling
has 224 lines of code (exceeds 25 allowed). Consider refactoring. Open
ajaxEditHandling: function (currentTdElement) {
const thisInstance = this;
let readRecord = $('.setReadRecord'),
detailViewValue = $('.value', currentTdElement),
editElement = $('.edit', currentTdElement),
File Record.php
has 540 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* OSSMailScanner Record model class.
*
File CalendarView.js
has 539 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 representing a standard calendar.
Function process
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
public function process(App\Request $request)
{
if (\Config\Security::$forceHttpsRedirection && !\App\RequestUtil::isHttps()) {
header("location: https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]", true, 301);
}
- 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 doTask
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
public function doTask($recordModel)
{
$moduleName = $recordModel->getModuleName();
$recordId = $recordModel->getId();
$entityType = $this->entity_type;
- 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 TextParser.php
has 538 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* TextParser test file.
*
* @package Tests
File ListView.php
has 536 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 61 functions (exceeds 20 allowed). Consider refactoring. Open
{
selectedRelatedTabElement: false,
parentRecordId: false,
parentModuleName: false,
moduleName: false,
`` has 61 functions (exceeds 20 allowed). Consider refactoring. Open
{
formElement: false,
relationOperation: '',
moduleName: app.getModuleName(),
getForm: function () {
Function process
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
public function process()
{
$html = '';
if (!$this->textParser->recordModel->getModule()->isInventory()) {
return $html;
- 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"