Showing 4,652 of 306,333 total issues
Method showSearchComments
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function showSearchComments(App\Request $request)
{
if (!\App\Privilege::isPermitted('ModComments')) {
throw new \App\Exceptions\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406);
}
Method showModTrackerByField
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function showModTrackerByField(App\Request $request)
{
$moduleName = $request->getModule();
$recordModel = $this->record->getRecord();
$fieldName = $request->getByType('field', 'Alnum');
Method owners
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function owners(App\Request $request)
{
$owner = App\Fields\Owner::getInstance();
$owner->showRoleName = true;
$owner->find($request->getByType('value', 'Text'));
Method getRelationListModel
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getRelationListModel(App\Request $request)
{
$parentRecordModel = \Vtiger_Record_Model::getInstanceById($request->getInteger('record'), $request->getModule());
$relationId = $request->isEmpty('relationId') ? false : $request->getInteger('relationId');
$cvId = $request->isEmpty('cvId', true) ? 0 : $request->getByType('cvId', \App\Purifier::ALNUM);
Method get
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get()
{
$rawData = $records = [];
$showRaw = $this->isRawData();
$queryGenerator = $this->getQuery();
Method getRecordFromRow
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getRecordFromRow(array $row): array
{
$record = ['recordLabel' => \App\Record::getLabel($row['id'])];
if ($this->fields) {
$moduleModel = reset($this->fields)->getModule();
Function registerSwitch
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerSwitch: function () {
this.container.find('.js-switch--inventory').on('click', (event) => {
event.preventDefault();
app.showConfirmModal({
title: app.vtranslate('JS_EXTENDED_MODULE'),
Function registerOnChangeEventForSourceModule
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerOnChangeEventForSourceModule: function () {
var form = this.getContainer();
form.on('change', '.sourceFields', function (e) {
var element = jQuery(e.currentTarget);
var container = jQuery(element.closest('tr'));
Function createUpdatedBlockFieldsList
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createUpdatedBlockFieldsList: function () {
var thisInstance = this;
var contents = this.container.find('.contents');
for (var index in thisInstance.updatedBlocksList) {
Function registerChangeVal
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerChangeVal: function (content) {
content.find('input[type="checkbox"]').on('change', function (e) {
let target = $(e.currentTarget),
value = target.is(':checked'),
params = {
Function deleteCustomBlock
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
deleteCustomBlock: function (blockId) {
var thisInstance = this;
var progressIndicatorElement = $.progressIndicator({
position: 'html',
blockInfo: {
Function registerDeleteShortCutEvent
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerDeleteShortCutEvent: function (shortcutsContainer = $('.js-shortcuts')) {
shortcutsContainer.on('click', '.unpin', (e) => {
e.preventDefault();
var actionEle = $(e.currentTarget);
var closestBlock = actionEle.closest('.js-shortcut');
Function preSaveValidation
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
preSaveValidation: function () {
const aDeferred = $.Deferred();
let formData = new FormData(this.container[0]);
formData.append('mode', 'preSaveValidation');
AppConnector.request({
Function registerCompare
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerCompare() {
let form = this.container.find('form');
this.container.find('.js-compare').on('click', () => {
let formData = form.serializeFormData();
formData['module'] = 'Products';
Function registerConvertLeadSubmit
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerConvertLeadSubmit: function () {
var thisInstance = this;
var formElement = this.getConvertLeadForm();
formElement.on('jqv.form.validating', function (e) {
Function makeDefault
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
makeDefault: function (container) {
var recordId = container.find('#recordId').val();
var module = app.getModuleName();
var postData = {
module: module,
Function loadCalendarData
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadCalendarData() {
const self = this,
progressInstance = $.progressIndicator({ blockInfo: { enabled: true } });
let options = this.getDefaultParams();
self.fullCalendar.removeAllEvents();
Function addRelationBetweenRecords
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addRelationBetweenRecords: function (relatedModule, relatedModuleRecordId, selectedTabElement, params = {}, url) {
let aDeferred = jQuery.Deferred();
let thisInstance = this;
let relatedController;
if (selectedTabElement == undefined) {
Function triggerMassEdit
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
triggerMassEdit: function (massEditUrl) {
let listInstance = Vtiger_List_Js.getInstance();
if (listInstance.checkListRecordSelected() !== true) {
let selectedCount = this.getSelectedRecordCount();
if (selectedCount > $('#listMaxEntriesMassEdit').val()) {
Function formatDate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
formatDate(startDate, endDate, type) {
switch (type) {
case 'month':
return Calendar_Js.monthFormat[CONFIG.dateFormat]
.replace('YYYY', startDate['year'])