Showing 4,652 of 306,333 total issues
Function setCalendarBasicOptions
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setCalendarBasicOptions() {
let eventLimit = app.getMainParams('eventLimit'),
userView = app.getMainParams('activity_view'),
defaultView = app.moduleCacheGet('defaultView'),
userTimeFormat = CONFIG.hourFormat;
Method throwNewException
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function throwNewException($e, $die = true, $messageHeader = 'LBL_ERROR')
{
if (!headers_sent() && \App\Config::security('cspHeaderActive')) {
header("content-security-policy: default-src 'self' 'nonce-" . \App\Session::get('CSP_TOKEN') . "'; object-src 'none';base-uri 'self'; frame-ancestors 'self';");
}
Method getDisplayValueByType
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getDisplayValueByType($value, \Vtiger_Record_Model $recordModel, \Vtiger_Field_Model $fieldModel, $params)
{
switch ($fieldModel->getFieldDataType()) {
case 'boolean':
$value = (1 === $value) ? 'LBL_YES' : 'LBL_NO';
Method process
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
if (!$this->textParser->recordModel || !$this->textParser->recordModel->getModule()->isInventory()) {
return '';
}
Method process
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
if (!$this->textParser->recordModel || !$this->textParser->recordModel->getModule()->isInventory()) {
return '';
}
Method process
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(): string
{
$html = '';
$moduleName = 'SSalesProcesses';
if (!empty($textParserParams = $this->textParser->getParam('textParserParams')) && isset($textParserParams['userId'])) {
Method process
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
if (!$this->textParser->recordModel || !$this->textParser->recordModel->getModule()->isInventory()) {
return '';
}
Method cpu
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function cpu(): array
{
$mathFunctions = self::$mathFunctions;
$mathCountGroup = 5000;
$mathMaxTime = 0.3;
Method find
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function find($value): array
{
$product = \App\YetiForce\Register::getProduct('YetiForceGeocoder');
if (empty($value) || !\App\RequestUtil::isNetConnection() || empty($product['params']['login']) || empty($product['params']['pass'])) {
return [];
Method getQuickCreateModules
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getQuickCreateModules($restrictList = false, $tree = false): array
{
$restrictListString = $restrictList ? 1 : 0;
if ($tree) {
$userModel = \App\User::getCurrentUserModel();
Method loadData
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function loadData(): void
{
if (empty($this->data)) {
return;
}
Method process
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$sSingleOrderTabId = \App\Module::getModuleId('SSingleOrders');
$fInvoiceTabId = \App\Module::getModuleId('FInvoice');
$productCategoryId = \App\Module::getModuleId('ProductCategory');
Method process
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$currentUser = Users_Record_Model::getCurrentUserModel();
$moduleName = 'Home';
$page = $request->getInteger('page');
Method process
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
$db = \App\Db::getInstance();
$executed = [];
$limit = 1000;
Method createQuery
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function createQuery(): void
{
$moduleName = $this->controller->request->getModule();
$this->queryGenerator = new \App\QueryGenerator($moduleName);
if ($cvId = $this->controller->request->getHeader('x-cv-id')) {
Method process
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
$db = App\Db::getInstance();
$lastUpdatedCrmId = (new App\Db\Query())->select(['crmid'])->from('u_#__openstreetmap_address_updater')->scalar();
if (false !== $lastUpdatedCrmId) {
File PublicHoliday.js
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* {[The file is published on the basis of YetiForce Public License 6.5 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */
'use strict';
$.Class(
'Settings_PublicHoliday_Js',
Function deleteUserPermanently
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
deleteUserPermanently: function (userId, e) {
e.stopPropagation();
app.showConfirmModal({
title: app.vtranslate('JS_DELETE_USER_PERMANENT_CONFIRMATION'),
confirmedCallback: () => {
Function deleteItemEvent
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
deleteItemEvent: function (id, inst) {
let self = this,
aDeferred = jQuery.Deferred(),
data = inst.get_json();
$.each(id, function (_index, e) {
Function hideVerticalBarDatalabelsIfNeeded
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
hideVerticalBarDatalabelsIfNeeded: function (chart) {
let getDatasetsMeta = function (chart) {
const datasets = [];
const data = chart.data;
if (typeof data !== 'undefined' && typeof data.datasets !== 'undefined' && Array.isArray(data.datasets)) {