Showing 4,652 of 306,333 total issues
Method process
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process(App\Request $request)
{
$this->initMeetingData($request);
$url = $this->meetingUrl;
$moduleName = $request->getModule();
Method loadFieldValuesFromSource
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function loadFieldValuesFromSource(App\Request $request): array
{
$this->hiddenInput['sourceView'] = $request->getByType('sourceView');
$this->hiddenInput['sourceModule'] = $request->getByType('sourceModule', 'Alnum');
$this->hiddenInput['entityState'] = $request->getByType('entityState', 'Alnum');
Method checkImportStatus
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function checkImportStatus(App\Request $request)
{
$moduleName = $request->getModule();
$user = \App\User::getCurrentUserModel();
// Check if import on the module is locked
Method getReference
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getReference(App\Request $request): void
{
if ($request->has('fieldName')) {
$fieldModel = Vtiger_Module_Model::getInstance($request->getModule())->getFieldByName($request->getByType('fieldName', 2));
if (empty($fieldModel) || !$fieldModel->isActiveField() || !$fieldModel->isViewEnabled()) {
Method getDefaultFieldValues
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getDefaultFieldValues()
{
$key = $this->module . '_' . $this->user->getId();
if (\App\Cache::staticHas('DefaultFieldValues', $key)) {
return \App\Cache::staticGet('DefaultFieldValues', $key);
Method getQueryByModuleField
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getQueryByModuleField($sourceModule, $field, $record, App\QueryGenerator $queryGenerator)
{
if ('SRecurringOrders' === $sourceModule && $record) {
$queryGenerator->addJoin(['INNER JOIN', 'u_#__srecurringorders', 'u_#__srecurringorders.accountid = vtiger_contactdetails.parentid AND u_#__srecurringorders.srecurringordersid = :records', [':records' => $record]]);
}
Method get
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get(): array
{
$this->createQuery();
$limit = $this->queryGenerator->getLimit();
$isRawData = $this->isRawData();
Method post
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function post(): array
{
$db = \App\Db::getInstance('webservice');
$userData = (new \App\Db\Query())->from($this->controller->app['tables']['user'])
->where(['user_name' => $this->controller->request->get('userName'), 'status' => 1])
Function setCalendarModuleOptions
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
setCalendarModuleOptions() {
const self = this;
return {
allDaySlot: app.getMainParams('allDaySlot'),
dateClick: (args) => {
- 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 getRule
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
getRule: function () {
var form = this.getForm();
var freq = form.find('.recurringType').val();
var rule = 'FREQ=' + freq;
rule += ';INTERVAL=' + form.find('.repeatFrequency').val();
- 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 getUi
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
getUi: function () {
let comparatorSelectedOptionVal = this.get('comparatorElementVal'),
html = '',
selectContainer;
if (
- 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 calculateTax
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
calculateTax: function (_row, modal) {
let netPriceWithoutTax = App.Fields.Double.formatToDb(modal.find('.valueNetPrice').text()),
valuePrices = netPriceWithoutTax,
globalTax = 0,
groupTax = 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 validateCustomMap
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
validateCustomMap: function () {
var errorMessage;
var params = {};
var saveMap = jQuery('#save_map').is(':checked');
if (saveMap) {
- 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 getDateInstance
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
getDateInstance: function (dateTime, dateFormat = CONFIG.dateFormat) {
let dateTimeComponents = dateTime.split(' '),
dateComponent = dateTimeComponents[0],
timeComponent = dateTimeComponents[1],
seconds = '00',
- 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 validate
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
validate: function (dependentFieldList) {
var field = this.getElement();
var fieldInfo = field.data('fieldinfo');
var fieldLabel;
if (typeof fieldInfo === 'undefined') {
- 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 registerModalController
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
registerModalController: function (modalId, modalContainer, cb) {
let windowParent = this.childFrame ? window.parent : window;
if (!modalId) {
modalId = Window.lastModalId;
}
- 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 sidebarKeyboard
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
sidebarKeyboard: function (e) {
let target = $(e.target);
if (e.which == this.keyboard.LEFT) {
if (target.hasClass('js-submenu-toggler') && !target.hasClass('collapsed')) {
target.click();
- 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 testCreateNewField
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function testCreateNewField($type, $param, $suffix = '')
{
$key = $type . $suffix;
$param['fieldType'] = $type;
$param['fieldLabel'] = $type . 'FL' . $suffix;
- 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 deleteModuleTables
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function deleteModuleTables()
{
\App\Log::trace('Start', __METHOD__);
$db = \App\Db::getInstance();
$db->createCommand()->checkIntegrity(false)->execute();
- 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 getAllModuleFieldsAsHeaders
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function getAllModuleFieldsAsHeaders(): array
{
$headers = [];
$exportBlockName = \App\Config::component('Export', 'BLOCK_NAME');
foreach ($this->moduleFieldInstances as $fieldModel) {
- 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"