Showing 4,652 of 306,333 total issues
Function registerSummaryViewContainerEvents
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
registerSummaryViewContainerEvents: function (summaryViewContainer) {
let thisInstance = this;
this.registerEventForActivityWidget();
this.registerChangeFilterForWidget();
this.registerAddingInventoryRecords();
Method getFieldInstanceByName
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFieldInstanceByName($name)
{
$moduleName = $this->getName(true);
$params = ['uitype' => 7, 'column' => $name, 'name' => $name, 'displaytype' => 1, 'typeofdata' => 'I~M', 'presence' => 0, 'isEditableReadOnly' => false, 'maximumlength' => '', 'validator' => [['name' => 'NumberRange100']], 'source' => 'main'];
switch ($name) {
Method process
has 132 lines of code (exceeds 25 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);
}
Method getFieldInstanceByName
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFieldInstanceByName($name)
{
$params = [];
$qualifiedModuleName = 'Settings:Picklist';
$tableName = $this->getTableName();
Function exportRelatedLists
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function exportRelatedLists(ModuleBasic $moduleInstance)
{
if (!$moduleInstance->isentitytype) {
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 purifyMultiDimensionArray
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
private function purifyMultiDimensionArray($values, $template)
{
if (\is_array($template)) {
foreach ($values as $firstKey => $value) {
if (\is_array($value)) {
- 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 getSender
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function getSender(): array
{
if (isset($this->senderCache)) {
return $this->senderCache;
}
- 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 35 (exceeds 5 allowed). Consider refactoring. Open
public function getStructure()
{
if (!empty($this->structuredValues)) {
return $this->structuredValues;
}
- 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 35 (exceeds 5 allowed). Consider refactoring. Open
public function save()
{
$db = \App\Db::getInstance();
$settingsModel = Settings_Menu_Module_Model::getInstance();
$edit = $this->get('edit');
- 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 createXml
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function createXml($entries, $entriesInventory)
{
$exportBlockName = \App\Config::component('Export', 'BLOCK_NAME');
$xml = new \XMLWriter();
$xml->openMemory();
- 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 35 (exceeds 5 allowed). Consider refactoring. Open
public function process(App\Request $request)
{
$moduleName = $request->getModule();
$relatedModuleName = $request->getByType('relatedModule', 2);
$parentId = $request->getInteger('record');
- 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 getFirstRowData
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function getFirstRowData($hasHeader = true)
{
$isInventory = $this->moduleModel->isInventory();
$rowData = $headers = $standardData = $inventoryData = [];
foreach ($this->data as $currentRow => $data) {
- 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 createQuery
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function createQuery(): void
{
$moduleName = $this->controller->request->getModule();
$this->queryGenerator = new \App\QueryGenerator($moduleName);
if ($cvId = $this->controller->request->getHeader('x-cv-id')) {
- 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 MultiAttachment.php
has 385 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* UIType Multi Attachment Field File.
*
* @package UIType
Method showRelatedRecords
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function showRelatedRecords(App\Request $request)
{
$parentId = $request->getInteger('record');
$pageNumber = $request->getInteger('page');
$relationId = $request->isEmpty('relationId') ? false : $request->getInteger('relationId');
Method initializeContent
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function initializeContent(App\Request $request)
{
$viewer = $this->getViewer($request);
$this->moduleName = $request->getModule();
$this->sourceModule = $request->getByType('src_module', 2);
Vtiger_Cache
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
class Vtiger_Cache
{
private static $selfInstance = false;
public static $cacheEnable = true;
protected $connector;
File ConfigTemplate.php
has 379 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* OSSMail module config.
*
* @copyright YetiForce S.A.
Function exportFields
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function exportFields(ModuleBasic $moduleInstance, $blockid)
{
$dataReader = (new \App\Db\Query())->from('vtiger_field')->where(['tabid' => $moduleInstance->id, 'block' => $blockid])->createCommand()->query();
if (0 === $dataReader->count()) {
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 recordsList
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
protected function recordsList($params)
{
[$moduleName, $columns, $conditions, $viewIdOrName, $limit, $maxLength, $params] = array_pad(explode('|', $params, 7), 7, '');
$paramsArray = $params ? self::parseFieldParam($params) : [];
$cvId = 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"