Showing 4,652 of 306,333 total issues
Function doTask
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function doTask($recordModel)
{
if (!\App\Module::isModuleActive('Calendar')) {
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 getNextTriggerTimeForMonthlyByDate
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function getNextTriggerTimeForMonthlyByDate($scheduledDayOfMonth, $scheduledTime)
{
$currentDayOfMonth = date('j', time());
if ($scheduledDayOfMonth) {
$scheduledDaysOfMonth = \App\Json::decode($scheduledDayOfMonth);
- 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 getAll
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public static function getAll($moduleName = '')
{
$query = (new App\Db\Query())->from('com_vtiger_workflow_tasktypes');
$dataReader = $query->createCommand()->query();
while ($rawData = $dataReader->read()) {
- 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 getQuery
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function getQuery()
{
$queryGenerator = new App\QueryGenerator($this->getModuleName());
if ($this->has('customFilter')) {
$queryGenerator->initForCustomViewById($this->get('customFilter'));
- 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 updateMailBoxCounter
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public static function updateMailBoxCounter(array $users): array
{
if (empty($users)) {
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 syncAddressBooks
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function syncAddressBooks(): int
{
\App\Log::trace('AddressBooks start', __METHOD__);
$dataReader = $this->getDavCardsToSync()->createCommand()->query();
$create = $deletes = $updates = $skipped = 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
Function process
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function process()
{
$moduleModel = \Vtiger_Module_Model::getInstance($this->textParser->moduleName);
$fields = $moduleModel->getFields();
$ids = $this->textParser->getParam('pdf')->getVariable('recordsId');
- 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 delete
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function delete()
{
switch ($this->typeSaving) {
case self::UPDATE_ALL_EVENTS:
$records = $this->getRecords($this->recordModel->get('followup'));
- 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 findRecordsById
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function findRecordsById($ids)
{
$return = false;
if (!empty($ids)) {
$recordModelMailScanner = Vtiger_Record_Model::getCleanInstance('OSSMailScanner');
- 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 saveToDb
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function saveToDb()
{
$db = \App\Db::getInstance();
$fileNameByField = 'filename';
if ('I' === $this->get('filelocationtype')) {
- 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 getRangeValues
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function getRangeValues()
{
$uiTypeModel = $this->getUITypeModel();
if (method_exists($uiTypeModel, 'getRangeValues')) {
return $uiTypeModel->getRangeValues();
- 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 getQuery
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
protected function getQuery($filter)
{
$request = \App\Request::init();
if ($this->getExtraData('relation_id') && $this->getExtraData('recordId')) {
$relationModelInstance = Vtiger_Relation_Model::getInstanceById($this->getExtraData('relation_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
Function getCustomViewList
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function getCustomViewList(): array
{
if (isset($this->customViewList)) {
return $this->customViewList;
}
- 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 convert
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
protected function convert(array $entries): array
{
$columns = array_keys($this->columns);
$fieldName = $this->fieldModel->getName();
$columnCounter = $records = $sum = [];
- 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 getColumnNames
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
protected function getColumnNames(): array
{
$headers = [];
$selectedColumnsList = [];
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
Function process
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function process()
{
$db = App\Db::getInstance();
$dataReader = (new App\Db\Query())->from('u_#__openstreetmap_record_updater')
->limit(App\Config::module('OpenStreetMap', 'cronMaxUpdatedAddresses'))
- 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 registerAjaxParams
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
registerAjaxParams(selectElement, params) {
params.tags = false;
params.language.searching = function () {
return app.vtranslate('JS_SEARCHING');
};
Method loadJoin
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function loadJoin()
{
$tableJoin = [];
$moduleTableIndexList = $this->entityModel->tab_name_index;
$baseTable = $this->entityModel->table_name;
File Cron.php
has 294 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 Condition.php
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Condition main class.
*