Showing 4,652 of 306,333 total issues
Function loadFieldSpecificUi
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadFieldSpecificUi(fieldSelect) {
const selectedOption = fieldSelect.find('option:selected');
const row = fieldSelect.closest('div.js-conditions-row');
const fieldUiHolder = row.find('.fieldUiHolder');
const fieldInfo = selectedOption.data('fieldinfo');
Function registerImport
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerImport() {
let form = this.container.find('form');
this.container.find('.js-import').on('click', () => {
let formData = form.serializeFormData();
if (formData['storage'] != 0 && !form.validationEngine('validate')) {
Function uncheckNode
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.uncheckNode = function (obj, e, traversing = false) {
let cascade = this.settings.checkbox.cascade;
if (typeof cascade !== 'undefined' && cascade) {
if (cascade.indexOf('down') !== -1 && !traversing) {
if (this.is_closed(obj)) {
Function deselect_node
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.deselect_node = function (obj, supress_event, e) {
if (this.get_node(obj).original.type == 'category') {
obj = this.get_node(obj);
if (obj.category.checked) {
this.uncheckNode(obj, e);
Function checkNode
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.checkNode = function (obj, e, traversing = false) {
let dom = this.get_node(obj, true);
this._data.category.selected.push(obj.id);
let cascade = this.settings.checkbox.cascade;
if (typeof cascade !== 'undefined' && cascade) {
Function uploadError
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
uploadError(_e, data) {
this.progressInstance.progressIndicator({ mode: 'hide' });
app.errorLog('File upload error.');
const { jqXHR, files } = data;
const response = jqXHR.responseJSON;
Method getRelatedLevelVariable
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRelatedLevelVariable($fieldType = false)
{
$cacheKey = "{$this->moduleName}|$fieldType";
if (isset(static::$relatedVariableLevel[$cacheKey])) {
return static::$relatedVariableLevel[$cacheKey];
Method initInventoryValuesByUser
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function initInventoryValuesByUser()
{
$invData = [];
$counter = 1;
foreach ($this->cleanRecordModels as $groupBy => $newRecordModel) {
Method process
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(): void
{
$scanner = $this->scannerEngine;
if ($this->checkExceptions('CreatedMail') || false !== $scanner->getMailCrmId()) {
return;
Method process
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(): string
{
$html = '';
$moduleName = $this->params[0];
if (!empty($textParserParams = $this->textParser->getParam('textParserParams')) && isset($textParserParams['userId'])) {
Method getUsersAndGroupForModuleList
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getUsersAndGroupForModuleList($view = false, $conditions = false, $fieldName = 'assigned_user_id')
{
$queryGenerator = new \App\QueryGenerator($this->moduleName, $this->currentUser->getId());
if ($view) {
$queryGenerator->initForCustomViewById($view);
Method truncateHtml
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function truncateHtml(?string $html, ?string $size = 'medium', ?int $length = 200, $showBtn = false): string
{
if (empty($html)) {
return '';
}
Method sendFromTemplate
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function sendFromTemplate(array $params): bool
{
Log::trace('Send mail from template', 'Mailer');
if (empty($params['template'])) {
Log::warning('No template', 'Mailer');
Method getValuesForSave
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getValuesForSave()
{
$forSave = [
'vtiger_users' => [
'date_modified' => date('Y-m-d H:i:s'),
Method step
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function step($step, App\Request $request)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
Method process
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
try {
$orderId = $message = '';
$responseType = 'success';
Method getListViewEntries
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getListViewEntries($pagingModel)
{
$moduleModel = $this->getModule();
$moduleName = $moduleModel->getName();
$parentModuleName = $moduleModel->getParentName();
Method save
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function save($mapping)
{
$db = \App\Db::getInstance();
$deleteMappingsList = $updateMappingsList = $createMappingsList = [];
foreach ($mapping as $mappingDetails) {
Method getDisplayValue
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getDisplayValue(string $key)
{
$fieldValue = $this->get($key);
switch ($key) {
case 'frequency':
Method updateReminderPostpone
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateReminderPostpone(string $time)
{
switch ($time) {
case '15m':
$datatime = date('Y-m-d H:i:s', strtotime('+15 min'));