Showing 4,652 of 306,333 total issues
Function registerSectionClick
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerSectionClick: function registerSectionClick() {
const thisInstance = this;
let pointer = false;
$(thisInstance.chartInstance.canvas)
.on('click', function (e) {
Function registerStep3
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerStep3(stepContainer) {
this.step3.append(stepContainer);
this.stepNumber.val(3);
App.Fields.Picklist.showSelect2ElementView(this.step3.find('select'));
this.footer.hide();
Function setDefaultGlobalTax
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setDefaultGlobalTax: function () {
let thisInstance = this;
let parentRow = thisInstance.getInventoryItemsContainer();
let taxDefaultValue = thisInstance
.getInventorySummaryTaxesContainer()
Function is_undetermined
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.is_undetermined = function (obj) {
obj = this.get_node(obj);
var s = this.settings.checkbox.cascade,
i,
j,
Function activate_node
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.activate_node = function (obj, e) {
if ($(e.target).hasClass('jstree-checkbox-disabled')) {
return false;
}
if (this.get_node(obj).original.type == 'category') {
Function registerEnableCurrencyEvent
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerEnableCurrencyEvent(container) {
container.on('change', '.js-enable-currency', (e) => {
let element = $(e.currentTarget);
let parentRow = element.closest('tr');
if (element.is(':checked')) {
Function redraw_node
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.redraw_node = function (obj, deep, is_callback, force_render) {
obj = parent.redraw_node.apply(this, arguments);
if (obj) {
var i,
j,
Function redraw_node
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.redraw_node = function (obj, deep, is_callback, force_render) {
obj = parent.redraw_node.apply(this, arguments);
if (obj) {
var i,
j,
Function getMentionData
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getMentionData(text, callback, searchModule = '-') {
let basicSearch = new Vtiger_BasicSearch_Js();
basicSearch.reduceNumberResults = app.getMainParams('gsAmountResponse');
basicSearch.returnHtml = false;
basicSearch.searchModule = searchModule;
Function registerMiddleClickScroll
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerMiddleClickScroll(container) {
let middleScroll = false;
container.on('mousedown', (e) => {
let clickedMouseButton = e.which; // get clicked button id
if (clickedMouseButton == 2 && middleScroll == false) {
Function validate
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
validate: function () {
let fieldValue = this.getFieldValue(),
groupSeperator = CONFIG.currencyGroupingSeparator,
integerRegex = new RegExp('(^[-+]?[\\d\\' + groupSeperator + ']+)$', 'g');
if (!fieldValue.match(integerRegex)) {
Method exportSharingAccess
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function exportSharingAccess(ModuleBasic $moduleInstance)
{
$permission = (new \App\Db\Query())->select(['permission'])->from('vtiger_def_org_share')->where(['tabid' => $moduleInstance->id])->column();
if (empty($permission)) {
return;
Method addLink
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function addLink($tabid, $type, $label, $url, $iconpath = '', $sequence = 0, $handlerInfo = null, $linkParams = null)
{
$db = \App\Db::getInstance();
if (0 != $tabid) {
$exists = (new \App\Db\Query())->from('vtiger_links')
Method updateBlocks
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateBlocks($modulenode, $moduleInstance)
{
if (empty($modulenode->blocks) || empty($modulenode->blocks->block)) {
return;
}
Method findError
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function findError(): void
{
$source = $this->driver->getPageSource();
if (false !== stripos($source, 'YetiError!!!')) {
// @codeCoverageIgnoreStart
Method testAddSharedAccessPolicy
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testAddSharedAccessPolicy()
{
$sourceId = 'Groups:2';
$targetId = 'Groups:2';
$permission = 0;
Method testAddGroups
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testAddGroups()
{
$modules = ['4', '7'];
$recordModel = \Settings_Groups_Record_Model::getCleanInstance();
$recordModel->set('groupname', 'Test groups');
Method getByRecordModel
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getByRecordModel(string $view, \Vtiger_Record_Model $recordModel, bool $cache = true): array
{
$cacheKey = $view . $recordModel->getId();
if ($cache && isset(self::$recordModelCache[$cacheKey])) {
return self::$recordModelCache[$cacheKey];
Method delete
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function delete($key)
{
if (isset($this->purifiedValuesByGet[$key])) {
unset($this->purifiedValuesByGet[$key]);
}
Method download
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function download(string $prefix)
{
if (!\App\RequestUtil::isNetConnection()) {
\App\Log::warning('ERR_NO_INTERNET_CONNECTION', __METHOD__);
static::$lastErrorMessage = 'ERR_NO_INTERNET_CONNECTION';