Showing 4,652 of 306,333 total issues
Vtiger_Link_Model
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Vtiger_Link_Model extends vtlib\Link
{
// Class variable to store the child links
protected $childlinks = [];
Function registerConditionsModal
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerConditionsModal(container) {
container.on('click', '.js-condition-modal', (e) => {
let element = $(e.currentTarget);
let fieldValue = element.closest('.js-conditions-row').find('[name="fieldname"]').val();
let sourceField = container.find('.js-condition-value');
Function getFiltersData
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getFiltersData: function (e, params) {
let currentElement;
if (e.currentTarget) {
currentElement = jQuery(e.currentTarget);
} else {
Function sanitizeFieldMapping
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sanitizeFieldMapping: function () {
var fieldsList = jQuery('.fieldIdentifier');
var mappedFields = {};
var inventoryMappedFields = {};
var errorMessage;
Function postMassEdit
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
postMassEdit: function (massEditContainer) {
let thisInstance = this;
let editInstance = Vtiger_Edit_Js.getInstance();
massEditContainer.find('.selectRow').on('change', function (e) {
let element = $(e.currentTarget);
Method importField
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function importField($blocknode, $blockInstance, $moduleInstance, $fieldnode)
{
$fieldInstance = new Field();
$fieldInstance->name = (string) $fieldnode->fieldname;
$fieldInstance->label = (string) $fieldnode->fieldlabel;
Method getBrowserInfo
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getBrowserInfo(): object
{
if (empty(self::$browserCache)) {
$browserAgent = strtolower(\App\Request::_getServer('HTTP_USER_AGENT', ''));
Method process
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
$html = '';
$moduleModel = \Vtiger_Module_Model::getInstance($this->textParser->moduleName);
$pdf = $this->textParser->getParam('pdf');
Method validate
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function validate(array $data, bool $throw = true)
{
$message = null;
$code = null;
$result = false;
Method getQuery
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getQuery()
{
$queryGenerator = new App\QueryGenerator($this->getModuleName());
if ($this->has('customFilter')) {
$queryGenerator->initForCustomViewById($this->get('customFilter'));
Method createInventoryTables
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function createInventoryTables()
{
$db = \App\Db::getInstance();
$importer = new \App\Db\Importers\Base();
$focus = CRMEntity::getInstance($this->getModuleName());
Method getWidgetData
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getWidgetData($moduleName, $owner)
{
$rawData = $data = $years = [];
$dateStart = ((int) date('Y') - 2) . '-01-01';
$dateEnd = date('Y-m-d', strtotime('last day of december'));
Method getQuery
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getQuery()
{
$queryGenerator = new App\QueryGenerator($this->getModuleName());
if ($this->has('customFilter')) {
$queryGenerator->initForCustomViewById($this->get('customFilter'));
File RecordStatus.php
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Record status service file.
*
* @package App
Function submit
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
submit() {
var aDeferred = jQuery.Deferred();
var form = this.getContainer();
var progressIndicatorElement = jQuery.progressIndicator({
position: 'html',
Function registerEvents
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerEvents: function () {
var thisInstance = this;
var container = this.getContainer();
container.on('change', '#searchModuleList', function (e) {
Function addComment
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addComment: function (currentTarget, data) {
const self = this;
let mode = currentTarget.data('mode'),
closestAddCommentBlock = currentTarget.closest('.js-add-comment-block'),
commentTextAreaElement = closestAddCommentBlock.find('.js-comment-content'),
Function registerSaveRecords
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerSaveRecords: function (container) {
const thisInstance = this;
let ord = [],
ocd = [];
$.each(thisInstance.getRecords(), function (index, value) {
Function registerModal
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerModal: function (container) {
if (typeof container === 'undefined') {
container = $('body');
}
container
Method updateField
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);