Showing 4,652 of 306,333 total issues
Method updateRecords
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateRecords()
{
if ($this->isEmpty('id')) {
return [];
}
Method recordSaveAttendee
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function recordSaveAttendee(\Vtiger_Record_Model $record)
{
if ('VEVENT' === (string) $this->vcomponent->name) {
$invities = $this->getInvitations($record->getId());
$time = VObject\DateTimeParser::parse($this->vcomponent->DTSTAMP);
Method process
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process(App\Request $request)
{
\App\Log::trace('Start ' . __METHOD__);
$qualifiedModule = $request->getModule(false);
$viewer = $this->getViewer($request);
Method getQuery
has 57 lines of code (exceeds 25 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'));
Method uploadAndParse
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function uploadAndParse(App\Request $request)
{
if (Import_Utils_Helper::validateFileUpload($request)) {
$user = App\User::getCurrentUserModel();
$fileReader = Import_Module_Model::getFileReader($request, $user);
Method get
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get(): array
{
$displayData = $fieldsLabel = [];
$moduleName = $this->controller->request->get('module');
$setRawData = 1 === (int) ($this->controller->headers['x-raw-data'] ?? 0);
Function validate
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
validate: function () {
let response = this._super();
if (response != true) {
return response;
}
- 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 mergeDeepReactive
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
export function mergeDeepReactive(target, ...sources) {
if (!sources.length) {
return Vue.observable(target)
}
const isObject = (item) => {
- 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 formatToHourText
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
formatToHourText: function (decTime, type = 'short', withSeconds = false, withMinutes = true) {
const short = type === 'short';
const hour = Math.floor(decTime);
const min = Math.floor((decTime - hour) * 60);
const sec = Math.round(((decTime - hour) * 60 - min) * 60);
- 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 handleMigration
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function handleMigration($modulenode, $moduleInstance)
{
$this->parseMigration($modulenode);
$cur_version = $moduleInstance->version;
foreach ($this->_migrations as $migversion => $migrationnode) {
- 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 updateField
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function updateField($blocknode, $blockInstance, $moduleInstance, $fieldnode, $fieldInstance)
{
// strval used because in $fieldnode there is a SimpleXMLElement object
$fieldInstance->name = (string) ($fieldnode->fieldname);
$fieldInstance->label = (string) ($fieldnode->fieldlabel);
- 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 getByModule
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function getByModule(int $tabId, ?int $gui = null): array
{
if (Cache::has('FieldsDependency', $tabId)) {
$fields = Cache::get('FieldsDependency', $tabId);
} 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 clearTemporaryFiles
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function clearTemporaryFiles(string $days = '-30 day'): array
{
$time = strtotime($days);
$exclusion = ['.htaccess', 'index.html'];
$s = $i = 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 getParent
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function getParent(int $record, string $moduleName): ?array
{
if (0 === \App\ModuleHierarchy::getModuleLevel($moduleName)) {
return ['id' => $record, 'moduleName' => $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 view
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function view($templateName, $moduleName = '', $fetch = false)
{
$templatePath = $this->getTemplatePath($templateName, $moduleName);
if (\App\Cache::has('ViewerTemplateExists', $templatePath)) {
$templateFound = \App\Cache::get('ViewerTemplateExists', $templatePath);
- 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 getConditions
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function getConditions($id): array
{
if (Cache::has('CustomView_GetConditions', $id)) {
return Cache::get('CustomView_GetConditions', $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 updateList
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function updateList(int $record): int
{
$sender = $this->getSender();
$return = 0;
if (!empty($sender['ip'])) {
- 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 getReceived
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function getReceived(): array
{
$rows = [];
foreach ($this->mailMimeParser->getAllHeadersByName('Received') as $key => $received) {
$row = ['key' => $key, 'fromIP' => $received->getFromAddress() ?? ''];
- 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 getById
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function getById($crmId)
{
$values = [];
if (\is_array($crmId)) {
foreach ($crmId as $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 clean
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function clean()
{
$time = microtime(true);
$lifeTime = \Config\Security::$maxLifetimeSession;
$exclusion = ['.htaccess', 'index.html', 'sess_' . session_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"