Showing 4,652 of 306,333 total issues
Method getSummary
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getSummary(array $modules, array $actions, array $dateRange, ?int $owner, ?int $historyOwner): array
{
$updates = $usedActions = [];
$query = (new \App\Db\Query())
->select(['vtiger_modtracker_basic.module'])
Method getApiDisplayValue
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getApiDisplayValue($value, Vtiger_Record_Model $recordModel, array $params = [])
{
$value = \App\Json::decode($value);
if (!$value || !\is_array($value)) {
return [];
Method getStructure
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getStructure()
{
if (!empty($this->structuredValues)) {
return $this->structuredValues;
}
Method getTreeList
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getTreeList()
{
$trees = [];
$isDeletable = $this->getRelationModel()->privilegeToTreeDelete();
$lastId = 0;
Method process
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
Method process
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$currentUser = Users_Record_Model::getCurrentUserModel();
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
Method getFieldInstanceByName
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFieldInstanceByName($name)
{
if (!isset($this->fieldForChartModal[$name]) || isset($this->getEditFields()[$name])) {
return parent::getFieldInstanceByName($name);
}
Method process
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$currentUser = Users_Record_Model::getCurrentUserModel();
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
Method getHierarchyData
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getHierarchyData(int $id, array $baseInfo, int $recordId, array &$listviewEntries, bool $getRawData = false, bool $getLinks = true): array
{
\App\Log::trace('Entering getHierarchyData(' . $id . ',' . $recordId . ') method ...');
$currentUser = Users_Privileges_Model::getCurrentUserModel();
$hasRecordViewAccess = $currentUser->isAdminUser() || \App\Privilege::isPermitted('HelpDesk', 'DetailView', $recordId);
Method returnData
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function returnData(): array
{
\App\User::setCurrentUserId($this->getUserData('user_id'));
$userModel = \App\User::getCurrentUserModel();
$data = [
Method getHierarchyData
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getHierarchyData(int $id, array $baseInfo, int $recordId, array &$listviewEntries, bool $getRawData = false, bool $getLinks = true): array
{
\App\Log::trace('Entering getHierarchyData(' . $id . ',' . $recordId . ') method ...');
$currentUser = Users_Privileges_Model::getCurrentUserModel();
$hasRecordViewAccess = $currentUser->isAdminUser() || \App\Privilege::isPermitted('Project', 'DetailView', $recordId);
Function submit
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
submit: function () {
var aDeferred = jQuery.Deferred();
this.calculateValues();
var form = this.getContainer();
var formData = form.serializeFormData();
Function registerEvents
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerEvents: function (e) {
var thisInstance = this;
var container = jQuery('#moduleManagerContents');
container.find('.createModule').on('click', thisInstance.createModule);
var scrollbar = container.find('.js-scrollbar');
Function registerSaveEvent
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerSaveEvent: function () {
var thisInstance = this;
jQuery('#cronJobSaveAjax').on('submit', function (e) {
var form = jQuery(e.currentTarget);
var validationResult = form.validationEngine('validate');
Function registerImportTemplate
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerImportTemplate: function (container) {
var thisInstance = this;
jQuery('#importButton', container).on('click', function (e) {
var currentElement = jQuery(e.currentTarget);
var url = currentElement.data('url');
Function registerConfig
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerConfig: function (container) {
let form = container.find('.js-filter-form');
form.validationEngine(app.validationEngineOptionsForRecord);
form.find('.js-save').click(function (e) {
if (form.validationEngine('validate')) {
Function registerEvents
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerEvents: function () {
var thisInstance = this;
thisInstance.registerSwitchEvents();
var forms = thisInstance.getContainer().find('form');
forms.on('submit', function (e) {
Function updateCheckbox
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateCheckbox: function (currentTarget) {
let aDeferred = jQuery.Deferred();
let currentTrElement = currentTarget.closest('tr');
let id = currentTrElement.data('id');
Function submit
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
submit: function () {
var aDeferred = jQuery.Deferred();
var form = this.getContainer();
this.calculateValues();
var formData = form.serializeFormData();
Function vtImageLoader
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var vtImageLoader = function (element, options) {
var thisInstance = this;
this.defaults = {
position: 'append',
mode: 'show'