Showing 4,652 of 306,333 total issues
Method getWidgetData
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getWidgetData(): array
{
$moduleName = $this->fieldModel->getModuleName();
$fieldName = $this->fieldModel->getName();
$columnName = $this->fieldModel->getColumnName();
Method getMetricList
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getMetricList()
{
$privilegesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
$query = (new App\Db\Query())->select(['cvid', 'viewname', 'entitytype', 'userid'])->from('vtiger_customview')
->where(['setmetrics' => 1]);
Method getValueForEditView
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getValueForEditView(string $name)
{
$value = '';
switch ($name) {
case 'title':
Method process
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$moduleName = $request->getModule();
$recordIds = self::getRecordsListFromRequest($request);
$configMaxMassDelete = App\Config::performance('maxMassDeleteRecords');
Method process
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$currentUserId = \App\User::getCurrentUserId();
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
Method helpDeskNewCommentOwner
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function helpDeskNewCommentOwner(Vtiger_Record_Model $recordModel)
{
\App\Log::trace('Entering helpDeskNewCommentOwner');
$relatedToId = $recordModel->get('related_to');
$result = (new \App\Db\Query())->select(['smownerid'])->from('vtiger_crmentity')->where(['deleted' => 0, 'crmid' => $relatedToId])->scalar();
Method transformInventoryForImport
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function transformInventoryForImport($inventoryData)
{
$inventoryModel = Vtiger_Inventory_Model::getInstance($this->module);
$inventoryFields = $inventoryModel->getFields();
$maps = $inventoryModel->getAutoCompleteFields();
Method getById
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getById($id)
{
$this->getStatuses();
$projects = $this->getProject($id);
$title = '';
Method createQuery
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function createQuery(): void
{
$this->isUserPermissions = \Api\WebservicePremium\Privilege::USER_PERMISSIONS === $this->getPermissionType();
if ($this->isUserPermissions) {
parent::createQuery();
Method post
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function post()
{
$relatedModule = 'Approvals';
$referenceFieldModel = null;
$queryGenerator = (new \App\QueryGenerator($this->controller->request->getModule()));
Function reActivateHiddenFields
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
reActivateHiddenFields: function (blockId, fields) {
let progressIndicatorElement = $.progressIndicator({
position: 'html',
blockInfo: {
enabled: true
Function registerStep1
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerStep1(container, blockId) {
const thisInstance = this;
container.find('.js-next-button').on('click', (e) => {
let selectedModule = this.container.find('[name="layoutEditorModules"]').val();
let type = container.find('select.type').val();
Function registerAllStatuses
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerAllStatuses: function (content) {
var thisInstance = this;
content.find('button.all-statuses').on('click', function () {
var status = thisInstance.allStatuses ? 0 : 1;
AppConnector.request({
Function saveFieldValues
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
saveFieldValues: function (fieldDetailList) {
var aDeferred = $.Deferred();
var thisInstance = this;
var lock = false;
var recordId = this.getRecordId();
Function registerAddSystemFieldEvent
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerAddSystemFieldEvent() {
let contents = this.container.find('.contents');
contents.find('.js-add-system-field').on('click', (e) => {
let blockId = $(e.currentTarget).closest('.editFieldsTable').data('blockId');
let selectedModule = this.container.find('[name="layoutEditorModules"]').val();
Function initEditLang
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
initEditLang: function (position) {
App.Fields.Picklist.changeSelectElementView($('.LangManagement .layoutContent .active .select2'), 'select2').on(
'change',
function (e) {
e = jQuery(this).closest('.active');
Function registerModalSubmitEvent
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerModalSubmitEvent(container) {
let thisInstance = this;
$('form', this.$editModal)
.add($('form', this.$duplicateModal))
.on('submit', (e) => {
Function validateName
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
validateName: function (data) {
let thisInstance = this;
let aDeferred = jQuery.Deferred();
let name = data.name;
Function registerCopyClipboard
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerCopyClipboard: function (editViewForm) {
for (let i in this.clipBoardInstances) {
this.clipBoardInstances[i].destroy();
}
this.clipBoardInstances[0] = new ClipboardJS('#customVariableCopy', {
Function addTaxDetails
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addTaxDetails: function (details) {
let container = jQuery('#TaxCalculationsContainer'),
taxTable;
//Based on tax type, we will add the tax details row