Showing 4,652 of 306,333 total issues
Function process
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
public function process()
{
$db = App\Db::getInstance();
$lastUpdatedCrmId = (new App\Db\Query())->select(['crmid'])->from('u_#__openstreetmap_address_updater')->scalar();
if (false !== $lastUpdatedCrmId) {
- 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
Method getFieldInstanceByName
has 172 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFieldInstanceByName($name)
{
switch ($name) {
case 'subject':
$params = [
`` has 49 functions (exceeds 20 allowed). Consider refactoring. Open
{
step3Container: false,
advanceFilterInstance: false,
conditionBuilderInstance: false,
ckEditorInstance: false,
Function getStructure
has a Cognitive Complexity of 44 (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
File actions.js
has 445 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]} */
import difference from 'lodash.difference'
let timer = false
export default {
File Field.php
has 444 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.1
* ("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 441 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_OSSMailScanner_Index_Js',
File Record.php
has 441 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 formatCurrencyValue
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
private function formatCurrencyValue($value)
{
$currencyPattern = $this->currencyFormat;
$curSeparator = $this->currencySeparator;
$decSeparator = $this->decimalSeparator;
- 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 getLicenseInformation
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
public static function getLicenseInformation($dir, $libraryName)
{
$licenseError = false;
$returnLicense = '';
$licenseToDisplay = '';
- 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 43 (exceeds 5 allowed). Consider refactoring. Open
public function save()
{
if (!$this->isNew) {
switch ($this->typeSaving) {
case self::UPDATE_ALL_EVENTS:
- 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 43 (exceeds 5 allowed). Consider refactoring. Open
public function process()
{
$html = '';
$relationModuleName = 'Products';
// Products from main storage
- 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 loadEditor
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
loadEditor(element, customConfig) {
this.setElement(element);
const instance = this.getEditorInstanceFromName();
let config = {
language: CONFIG.langKey,
Function constructor
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(container, projectData) {
this.container = $(container);
this.containerParent = this.container.parent();
this.headerContainer = this.containerParent.parent().find('.js-gantt-header').eq(0);
this.weekStart = 6 - CONFIG.firstDayOfWeekNos;
File RecordConverter.php
has 439 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* RecordConverter class.
*
File Gantt.js
has 435 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 Gantt {
/**
File ConfigTemplates.php
has 435 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Components config.
*
* @copyright YetiForce S.A.
Function recalculatePasswords
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public static function recalculatePasswords(string $method, string $password, string $vector)
{
$dbAdmin = \App\Db::getInstance('admin');
$decryptInstance = static::getInstance();
if ($decryptInstance->get('method') === $method && $decryptInstance->get('vector') === $vector && $decryptInstance->get('pass') === $password) {
- 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 addData
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function addData(Base $importer)
{
if (!isset($importer->data)) {
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 convertToNativeLink
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function convertToNativeLink()
{
$url = $this->get('linkurl');
if (empty($url)) {
return $url;
- 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"