Showing 4,652 of 306,333 total issues
Consider simplifying this complex logical expression. Open
Open
if (!$userPrivilegesModel->hasModuleActionPermission($request->getModule(), 'Import') || !$userPrivilegesModel->hasModuleActionPermission($request->getModule(), 'CreateView') || (
$relationId && (
!($relationModel = Vtiger_Relation_Model::getInstanceById($relationId))
|| !$relationModel->isAddActionSupported()
|| $relationModel->getRelationModuleName() !== $request->getModule()
Function triggerMassOff2FA
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
triggerMassOff2FA: function () {
let url = window.location.href;
let listInstance = Settings_Vtiger_List_Js.getInstance();
let validationResult = listInstance.checkListRecordSelected();
if (validationResult !== true) {
Function registerAddMember
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerAddMember() {
this.container.find('.js-data-table').on('click', '.js-member-add', (e) => {
let url = e.currentTarget.dataset.url + '&groupID=' + this.container.find('form').serializeFormData()['groupID'];
app.showModalWindow(
null,
Function confirmedCallback
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
confirmedCallback: () => {
var module = app.getModuleName();
var postData = {
module: module,
action: 'TaskAjax',
Function setDefaultEndTime
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setDefaultEndTime: function (container) {
const self = this;
if (container.find('.js-autofill').is(':checked')) {
self.getFreeTime(container);
} else {
Function registerMainCheckBoxClickEvent
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerMainCheckBoxClickEvent: function () {
const self = this;
this.getRelatedContainer().on('click', '#relatedListViewEntriesMainCheckBox', function () {
let selectedIds = self.readSelectedIds(),
excludedIds = self.readExcludedIds();
Function changeWatching
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
changeWatching: function (instance) {
let value, module, state, className, user, record;
if (instance != undefined) {
instance = $(instance);
value = instance.data('value');
Function submitSearchForm
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
submitSearchForm(detailContentsHolder) {
let searchTextDom = detailContentsHolder.find('.js-comment-search'),
widgetContainer = searchTextDom.closest('[data-name="ModComments"]'),
progressIndicatorElement = $.progressIndicator();
if (searchTextDom.data('container') === 'widget' && !searchTextDom.val()) {
Function registerNavigatorButtons
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerNavigatorButtons: function () {
const container = this.getContainer();
let btnStart = container.find('.js-time-counter-start');
let btnStop = container.find('.js-time-counter-stop');
let btnReset = container.find('.js-time-counter-reset');
Function saveData
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
saveData(container, data) {
let form = container.find('form');
container.on('click', '.js-modal__save', (e) => {
if (form.validationEngine('validate')) {
e.preventDefault();
Function itemRenderer
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
itemRenderer: function (li, e) {
$('<span />').addClass(csscls('message')).text(e.message).appendTo(li);
if (e.file) {
var header = $('<span />')
.addClass(csscls('filename'))
Function showLazySelect
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showLazySelect(selectElement, params) {
$.fn.select2.amd.require(['select2/data/array', 'select2/utils'], (ArrayData, Utils) => {
function CustomData($element, params) {
CustomData.__super__.constructor.call(this, $element, params);
}
Function init
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init() {
$('.js-changesjson-edit', this.container)
.off('click')
.on('click', () => {
let field = this.getField();
Method exportCustomViews
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function exportCustomViews(ModuleBasic $moduleInstance)
{
$customViewDataReader = (new \App\Db\Query())->from('vtiger_customview')->where(['entitytype' => $moduleInstance->name])
->createCommand()->query();
if (!$customViewDataReader->count()) {
Method export
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function export()
{
$timings = [];
$stack = [];
foreach ($this->messages as $i => $log) {
Method setUpdater
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function setUpdater($moduleName, $record = false, $priority = false, $type = 1)
{
$params = [
'module' => $moduleName,
'type' => $type,
Method getViewId
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getViewId($noCache = false)
{
\App\Log::trace(__METHOD__);
if (isset($this->defaultViewId)) {
return $this->defaultViewId;
Method relatedRecordsList
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function relatedRecordsList($params)
{
[$relatedModuleName, $columns, $conditions, $viewIdOrName, $limit, $maxLength] = array_pad(explode('|', $params), 6, '');
if (is_numeric($relatedModuleName)) {
if ($relationListView = \Vtiger_RelationListView_Model::getInstance($this->recordModel, '', $relatedModuleName)) {
Method install
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function install(\Composer\Script\Event $event): void
{
$rootDir = realpath(__DIR__ . '/../../');
if (!\defined('ROOT_DIRECTORY')) {
\define('ROOT_DIRECTORY', $rootDir);
Method process
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(): string
{
$relatedModuleName = 'Documents';
if (!$this->textParser->recordModel
|| !\App\Privilege::isPermitted($relatedModuleName)