Showing 4,652 of 306,333 total issues
Function importLayout
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function importLayout($zipfile)
{
$name = $this->_modulexml->name;
$label = $this->_modulexml->label;
\App\Log::trace("Importing $name ... STARTED", __METHOD__);
- 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 parseParams
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function parseParams(array $params)
{
foreach ($params as $param => $value) {
switch ($param) {
case 'margin-top':
- 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 parsePhone
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
private function parsePhone(): void
{
$country = null;
if ($userId = $this->user ? $this->user->getId() : null) {
$country = \App\Fields\Country::getCountryCode(\App\User::getUserModel($userId)->getDetail('sync_carddav_default_country'));
- 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 32 (exceeds 5 allowed). Consider refactoring. Open
public function validate(array $data, bool $throw = true)
{
$message = null;
$code = null;
$result = false;
- 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 32 (exceeds 5 allowed). Consider refactoring. Open
public function process()
{
$dbCommand = App\Db::getInstance()->createCommand();
$scannerModel = Vtiger_Record_Model::getCleanInstance('OSSMailScanner');
$dataReader = (new App\Db\Query())->select([
- 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 normalizeData
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
protected function normalizeData()
{
foreach ($this->data as &$dividing) {
foreach ($dividing as $groupValueKey => &$values) {
// iterate data one more time to search other group values
- 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 showRelatedRecords
has a Cognitive Complexity of 32 (exceeds 5 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');
- 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 showSearchResults
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function showSearchResults(App\Request $request)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$advFilterList = $request->getArray('advfilterlist', 'Text');
- 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 createTree
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
createTree: function () {
const self = this;
if (!this.jstreeInstance) {
self.jstreeLastID = parseInt($('#treeLastID').val());
let treeValues = $('#treeValues').val(),
Method db
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function db(): array
{
$benchmarkCountGroup = 20;
$insertCountGroup = 5;
$updateCountGroup = 5;
Validator
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class Validator
{
/**
* Function verifies if given value can be recognized as bool.
*
DateField
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class DateField extends BaseField
{
use \App\Conditions\RecordTraits\Comparison;
use \App\Conditions\RecordTraits\ComparisonField;
Calendar
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class Calendar
{
/**
* Record model instance.
*
Method initializeListViewContents
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function initializeListViewContents(App\Request $request, Vtiger_Viewer $viewer)
{
$moduleName = $request->getModule();
$cvId = $request->getByType('viewname', 2);
$pageNumber = $request->getInteger('page');
Method generate
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generate(App\Request $request): void
{
$pdfModuleName = $request->getModule();
$view = $request->getByType('fromview', \App\Purifier::STANDARD);
$recordId = $request->isEmpty('record', true) ? null : $request->getInteger('record');
Function registerParams
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
registerParams(selectElement, params) {
if (typeof params.dropdownParent === 'undefined') {
const modalParent = $(selectElement).closest('.modal-body');
if (modalParent.length) {
params.dropdownParent = modalParent;
- 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 retrieveEntityInfo
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function retrieveEntityInfo(int $record, string $module)
{
if (!isset($record)) {
throw new \App\Exceptions\NoPermittedToRecord('LBL_RECORD_NOT_FOUND');
}
- 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 hardDrive
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
private static function hardDrive(): array
{
$countGroup = 50;
$maxTime = 0.2;
$read = $write = [];
- 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 updateRecords
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function updateRecords()
{
if ($this->isEmpty('id')) {
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 transferOwnershipForWorkflow
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
private static function transferOwnershipForWorkflow($oldId, $newId)
{
$db = \App\Db::getInstance();
$ownerName = static::getLabel($oldId);
$newOwnerName = static::getLabel($newId);
- 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"