Showing 4,652 of 306,333 total issues
Method preProcess
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function preProcess(App\Request $request, $display = true)
{
parent::preProcess($request, false);
$moduleName = $request->getModule();
`` has 28 functions (exceeds 20 allowed). Consider refactoring. Open
{
menuContainer: false,
contentContainer: false,
init: function () {
this.setContentsContainer('.js-base-container');
`` has 28 functions (exceeds 20 allowed). Consider refactoring. Open
{
filterContainer: false,
//Hold the conditions for a particular field type
fieldTypeConditionMapping: false,
//Hold the condition and their label translations
ModuleBasic
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
class ModuleBasic
{
/** ID of this instance */
public $id = false;
public $name = false;
Method export
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function export(Module $moduleInstance, $todir = '', $zipFileName = '', $directDownload = false)
{
$this->zipFileName = $zipFileName;
$this->moduleInstance = $moduleInstance;
$module = $this->moduleInstance->name;
Method process
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process()
{
$html = '';
if (!$this->textParser->recordModel->getModule()->isInventory()) {
return $html;
Method sendByRowQueue
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function sendByRowQueue($rowQueue)
{
if ('demo' === \App\Config::main('systemMode')) {
return true;
}
Method process
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process()
{
\App\Log::trace('Start create AddressBook');
$limit = App\Config::performance('CRON_MAX_NUMBERS_RECORD_ADDRESS_BOOK_UPDATER');
Method get
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get(): array
{
$limit = 100;
$relationModuleName = $this->controller->request->getByType('param', 'Alnum');
$relationId = false;
File PickListHandler.php
has 304 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class Settings_Picklist_PickListHandler_Handler
{
/**
Function registerListEvents
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
registerListEvents: function () {
let thisInstance = this;
this.content.find('a.favorites').on('click', function () {
let progressInstance = jQuery.progressIndicator({
position: 'html',
Method recordsList
has 82 lines of code (exceeds 25 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;
Method searchCodeInjection
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function searchCodeInjection(): bool
{
if (!\function_exists('token_get_all')) {
return true;
}
Method save
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function save(App\Request $request)
{
$workflowId = !$request->isEmpty('for_workflow') ? $request->getInteger('for_workflow') : 0;
if (!empty($workflowId)) {
$record = !$request->isEmpty('task_id') ? $request->getInteger('task_id') : 0;
Method getValueFromImport
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getValueFromImport($value, $defaultValue = null)
{
if (empty($value)) {
return '';
}
Function getUi
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
getUi: function () {
let comparatorSelectedOptionVal = this.get('comparatorElementVal'),
dateSpecificConditions = this.get('dateSpecificConditions'),
html = '';
if (comparatorSelectedOptionVal === 'bw' || comparatorSelectedOptionVal === 'custom') {
- 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 export
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function export(Module $moduleInstance, $todir = '', $zipFileName = '', $directDownload = false)
{
$this->zipFileName = $zipFileName;
$this->moduleInstance = $moduleInstance;
$module = $this->moduleInstance->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 getAllModules
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
{
if (\App\Cache::has('moduleTabs', 'all')) {
$moduleList = \App\Cache::get('moduleTabs', 'all');
} else {
- 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 loadLanguageFile
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public static function loadLanguageFile($language, $moduleName = '_Base')
{
if (!isset(static::$languageContainer[$language][$moduleName])) {
if (Cache::has('LanguageFiles', $language . $moduleName)) {
static::$languageContainer[$language][$moduleName] = Cache::get('LanguageFiles', $language . $moduleName);
- 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 install
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public static function install(\Composer\Script\Event $event): void
{
$rootDir = realpath(__DIR__ . '/../../');
if (!\defined('ROOT_DIRECTORY')) {
\define('ROOT_DIRECTORY', $rootDir);
- 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"