Showing 4,652 of 306,333 total issues
Method showRelatedList
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function showRelatedList(App\Request $request)
{
$moduleName = $request->getModule();
$relatedModuleName = $request->getByType('relatedModule', 2);
$parentId = $request->getInteger('record');
Vtiger_Base_UIType
has 42 functions (exceeds 20 allowed). Consider refactoring. Open
class Vtiger_Base_UIType extends \App\Base
{
/** @var bool Search allowed */
protected $search = true;
File Record.php
has 402 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 Index.js
has 401 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_MailRbl_Index_Js',
File PackageUpdate.php
has 400 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 findByDomainField
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public static function findByDomainField(string $moduleName, array $fields, array $emails): array
{
$return = $activeFields = $domainsAndEmails = [];
foreach ($emails as $email) {
$domainsAndEmails[mb_strtolower(explode('@', $email)[1])][] = $email;
- 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 recalculateSharingRulesByUser
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public static function recalculateSharingRulesByUser($id)
{
$userModel = \App\User::getUserModel($id);
if (!$userModel->getId()) {
return null;
- 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 imapConnect
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public static function imapConnect($user, $password, $host = '', $folder = 'INBOX', $dieOnError = true, $config = [], array $account = [])
{
\App\Log::trace("Entering OSSMail_Record_Model::imapConnect($user , '****' , $folder) method ...");
if (!$config) {
$config = self::loadRoundcubeConfig();
- 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 setRelatedParent
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public function setRelatedParent(App\Request $request)
{
$filterFields = $request->getArray('filterFields', 'Text');
if (!($relationId = $request->isEmpty('relationId') ? 0 : $request->getInteger('relationId')) && $this->sourceField) {
$relationId = \App\Relation::getRelationId($this->moduleName, $this->sourceModule, $this->sourceField);
- 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 37 (exceeds 5 allowed). Consider refactoring. Open
public function process()
{
$db = \App\Db::getInstance();
$executed = [];
$limit = 1000;
- 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 Request.php
has 399 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Request basic class.
*
* @package App
File UserPrivilegesFile.php
has 399 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App;
/**
File ModuleBasic.php
has 396 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
Vtiger_Basic_InventoryField
has 41 functions (exceeds 20 allowed). Consider refactoring. Open
class Vtiger_Basic_InventoryField extends \App\Base
{
/**
* Field visible everywhere.
*/
File Record.php
has 395 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
Method process
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process(App\Request $request)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
File Mail.php
has 394 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Mail Scanner bind email action.
*
* @package Model
Function loadJoin
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public function loadJoin()
{
$tableJoin = [];
$moduleTableIndexList = $this->entityModel->tab_name_index;
$baseTable = $this->entityModel->table_name;
- 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 get
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public function get(): array
{
$limit = 100;
$relationModuleName = $this->controller->request->getByType('param', 'Alnum');
$relationId = 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 CustomView.js
has 391 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.