Showing 4,652 of 306,333 total issues
Method formatDateIntoStrings
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function formatDateIntoStrings($date, $time = false)
{
$currentUser = Users_Record_Model::getCurrentUserModel();
$dateTimeInUserFormat = App\Fields\DateTime::formatToDisplay($date . ' ' . $time);
Method process
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request, $widget = null)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
if ($widget && !$request->has('widgetid')) {
Method getRecordDataFromXMLTemplate
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRecordDataFromXMLTemplate(XMLReader $xmlToImport)
{
$recordData = [];
$recordNum = 0;
$firstElement = '';
Method getHierarchyData
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getHierarchyData($id, $iStorageInfoBase, $iStorageId, &$listviewEntries, $getRawData = false, $getLinks = true)
{
\App\Log::trace('Entering getHierarchyData(' . $id . ',' . $iStorageId . ') method ...');
$hasRecordViewAccess = \App\Privilege::isPermitted('IStorages', 'DetailView', $iStorageId);
Method getFirstRowData
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFirstRowData($hasHeader = true)
{
$isInventory = $this->moduleModel->isInventory();
$rowData = $headers = $standardData = $inventoryData = [];
foreach ($this->data as $currentRow => $data) {
Method process
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
$html = '';
$relationModuleName = 'Products';
$relationListView = \Vtiger_RelationListView_Model::getInstance($this->textParser->recordModel, $relationModuleName);
Method getFieldInstanceByName
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFieldInstanceByName($name)
{
if (!isset($this->customFields[$name])) {
return parent::getFieldInstanceByName($name);
}
Method getImportStatusCount
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getImportStatusCount()
{
$statusCount = ['TOTAL' => 0, 'IMPORTED' => 0, 'FAILED' => 0, 'PENDING' => 0,
'CREATED' => 0, 'SKIPPED' => 0, 'UPDATED' => 0, 'MERGED' => 0, ];
$tableName = Import_Module_Model::getDbTableName($this->user);
Method entityAfterSave
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function entityAfterSave(App\EventHandler $eventHandler): void
{
$typeAddressToUpdate = [];
$recordModel = $eventHandler->getRecordModel();
if (!$recordModel->isNew()) {
Method testNumbers
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function testNumbers($moduleName, $fieldName, $userFormat, $dbFormat, $decimalSeparator, $groupingSeparator, $groupingPattern, $afterDot, $symbolPlacement, $truncate, $correct = true): void
Function registerSubmitForm
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerSubmitForm: function () {
var form = this.getForm();
form.on('submit', function (e) {
e.preventDefault();
e.stopPropagation();
Function submit
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
submit() {
var aDeferred = $.Deferred();
var form = this.getContainer();
var formData = form.serializeFormData();
var progressIndicatorElement = $.progressIndicator({
Function deleteCustomRule
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
deleteCustomRule: function (deleteElement) {
let deleteUrl = deleteElement.data('url');
let currentRow = deleteElement.closest('.js-custom-rule-entries');
app.showConfirmModal({
title: app.vtranslate('LBL_DELETE_CONFIRMATION'),
Function registerBasicEvents
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerBasicEvents() {
this.moduleField.on('change', (e) => {
this.changeModule($(e.currentTarget).val());
});
this.picklistContainer.on('change', '.js-picklist-field', (e) => {
Function registerDataTable
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerDataTable: function (container) {
let table = container.find('.js-data-table');
let form = container.find('.js-filter-form');
let dataTable = app.registerDataTables(table, {
order: [],
Function registerDashboardAction
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerDashboardAction() {
const thisInstance = this;
$('.editDashboard').on('click', (e) => {
let currentTarget = $(e.currentTarget);
e.stopPropagation();
Function registerConfigModal
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerConfigModal: function (container) {
container.find('.js-show-config-modal').on('click', function () {
const recordCollectorName = this.dataset.name;
app.showModalWindow(
null,
Function addDetails
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addDetails: function (details) {
let container = jQuery('#inventory'),
currency = jQuery('#currency'),
symbol = '%',
table = $('.inventoryTable', container),
Function registerDataTable
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerDataTable: function (container) {
const self = this;
let form = container.find('.js-filter-form');
App.Fields.Date.registerRange(form);
let table = container.find('.js-data-table');
Function registerDeleteHolidayEvent
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerDeleteHolidayEvent(container) {
let thisInstance = this;
this.$itemsContainer.on('click', '.deleteHoliday', (e) => {
app.showConfirmModal({
title: app.vtranslate('JS_DELETE_RECORD_CONFIRMATION'),