Showing 4,652 of 306,333 total issues
File DashBoard.js
has 609 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*+**********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.1
* ("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.
Function category
has 265 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.jstree.plugins.category = function (options, parent) {
this.bind = function () {
parent.bind.call(this);
this._data.category.selected = [];
this.element.on(
Method getDetailViewLinks
has 265 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getDetailViewLinks(array $linkParams): array
{
if ($this->has('Links')) {
return $this->get('Links');
}
Function getBreadcrumbs
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
public static function getBreadcrumbs($pageTitle = false)
{
$breadcrumbs = [];
$request = App\Request::init();
$userPrivModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
- 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 WebservicePremiumTest.php
has 602 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Webservice Premium Test integrations test file.
*
* @see https://github.com/Maks3w/SwaggerAssertions/
Method checkPermission
has 259 lines of code (exceeds 25 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();
Function process
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
public function process(): string
{
$html = '';
$moduleName = $this->params[0];
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"
Further reading
Function getPluralized
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
private static function getPluralized($count)
{
//Extract language code from locale with special cases
if (0 === strcasecmp(static::getLanguage(), 'pt-BR')) {
$lang = 'pt-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
QueryGenerator
has 68 functions (exceeds 20 allowed). Consider refactoring. Open
class QueryGenerator
{
const STRING_TYPE = ['string', 'text', 'email', 'reference'];
const NUMERIC_TYPE = ['integer', 'double', 'currency', 'currencyInventory'];
const DATE_TYPE = ['date', 'datetime'];
File MultiImage.js
has 580 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 MultiImage {
/**
Function process
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
public function process()
{
$html = '';
[$relatedModuleName, $relatedModuleField, $fieldsToShow] = array_pad($this->params, 3, null);
$fieldsToShow = !empty($fieldsToShow) ? explode(',', $fieldsToShow) : ['seq', 'name', 'qty', 'discount', 'currency', 'discountmode', 'taxmode', 'price', 'gross', 'net', 'tax', 'total'];
- 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 63 (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"
Further reading
Function process
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
public function process(App\Request $request)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(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
File Data.php
has 579 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 Record.php
has 575 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* OSSMail record model file.
*
* @package Model
File WidgetsManagement.js
has 567 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(
'Settings_WidgetsManagement_Js',
Function setRecordFieldValues
has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring. Open
public function setRecordFieldValues($parentRecordModel)
{
$mfInstance = Vtiger_MappedFields_Model::getInstanceByModules($parentRecordModel->getModule()->getId(), $this->getModule()->getId());
if ($mfInstance) {
$defaultInvRow = [];
- 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 Edit.js
has 564 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 Gantt.php
has 564 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Gantt Model class.
*
Function search
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
public function search(): array
{
if (!$this->isActive()) {
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"