Showing 4,652 of 306,333 total issues
Function registerChangeVal
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerChangeVal: function (content) {
content.on('change', '.configField', function (e) {
let target = $(e.currentTarget),
params = {
module: app.getModuleName(),
Function registerChangeEvents
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerChangeEvents: function (container) {
container.find('.js-status-change').on('click', function () {
let elements = $(this).closest('tr').find('.js-visibility');
if (elements.length) {
if (this.checked) {
Function registerAutoFillHours
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerAutoFillHours: function (container) {
const thisInstance = this;
let allDay = container.find('[name="allday"]'),
timeStart = container.find('[name="time_start"]'),
timeEnd = container.find('[name="time_end"]'),
Function preQuickCreateSave
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
let preQuickCreateSave = function (data) {
let index, queryParam, queryParamComponents;
let queryParameters = [];
//To handle switch to task tab when click on add task from related list of activities
Function clearFieldValue
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
clearFieldValue: function (element) {
const self = this;
let fieldValueContener = element.closest('.fieldValue');
let fieldNameElement = fieldValueContener.find('.sourceField');
let fieldName = fieldNameElement.attr('name');
Function registerContentEvents
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerContentEvents() {
const container = this.getContainer();
$('.js-history-detail', container).on('click', (e) => {
let actionId = e.currentTarget.dataset.action;
let widgetData = JSON.parse(container.find('.js-widget-data').val());
Function getDiscount
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getDiscount: function (row) {
let discountParams = row.find('.discountParam').val();
if (discountParams == '' || discountParams == 'null' || discountParams == '[]' || discountParams == undefined) {
return 0;
}
Function registerUnreviewedCountEvent
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerUnreviewedCountEvent: function () {
let ids = [],
listViewContentDiv = this.getListViewContentContainer(),
isUnreviewedActive = listViewContentDiv.find('.unreviewed').length;
listViewContentDiv.find('tr.listViewEntries').each(function () {
Function getListViewRecords
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getListViewRecords: function (urlParams) {
let aDeferred = $.Deferred();
if (typeof urlParams === 'undefined') {
urlParams = {};
}
Function loadCalendarData
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadCalendarData: function () {
this.fullCalendar.removeAllEvents();
const start_date = App.Fields.Date.dateToUserFormat(this.fullCalendar.view.activeStart),
end_date = App.Fields.Date.dateToUserFormat(this.fullCalendar.view.activeEnd),
parent = this.getContainer();
Function triggerMassMargin
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
triggerMassMargin: function () {
const self = Vtiger_RelatedList_Js.relatedListInstance;
let selected_ids = self.readSelectedIds(true),
excluded_ids = self.readExcludedIds(true);
if (self.checkListRecordSelected() !== true) {
Function getRecordsList
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getRecordsList: function () {
let thisInstance = this;
let container = thisInstance.getContainer();
let progressIndicator = jQuery.progressIndicator({
message: app.vtranslate('JS_LOADING_OF_RECORDS'),
Function registerMainCheckBoxClickEvent
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerMainCheckBoxClickEvent: function () {
let listViewPageDiv = this.getListViewContainer();
let thisInstance = this;
listViewPageDiv.on('click', '#listViewEntriesMainCheckBox', function () {
let selectedIds = thisInstance.readSelectedIds();
Function registerImageEvents
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerImageEvents() {
let fileInput = this.container.find('.js-icon-file');
if (fileInput.length) {
let fieldInfo = fileInput.data('fieldinfo') || {};
this.container.find('.js-image-add').on('click', () => {
Function loadSavedMap
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadSavedMap: function () {
var selectedMapElement = jQuery('#saved_maps option:selected');
var mapId = selectedMapElement.attr('id');
var fieldsList = jQuery('.fieldIdentifier');
var deleteMapContainer = jQuery('#delete_map_container');
Method createFiles
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function createFiles(Field $entityField)
{
$targetpath = 'modules/' . $this->name;
if (!is_file($targetpath)) {
Method getFilter
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFilter(): \SebastianBergmann\CodeCoverage\Filter
{
if (!isset($this->filter)) {
$filter = new \SebastianBergmann\CodeCoverage\Filter();
$filter->includeDirectory(ROOT_DIRECTORY . '/api');
Method getComponentClassName
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getComponentClassName($componentType, $componentName, $moduleName = 'Vtiger', $throwException = true)
{
$cacheKey = "$componentType|$componentName|$moduleName";
if (isset(self::$componentClassCache[$cacheKey])) {
return self::$componentClassCache[$cacheKey];
Method sanitizeInventoryValues
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function sanitizeInventoryValues(array $inventoryRow, array $inventoryFields): array
{
$inventoryEntries = [];
foreach ($inventoryFields as $columnName => $field) {
$value = $inventoryRow[$columnName];
Method passwordAuth
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function passwordAuth(): void
{
$this->climate->arguments->add([
'login' => [
'prefix' => 'l',