Showing 4,652 of 306,333 total issues
Method save
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function save($saveMapping = false)
{
\App\Log::trace('Entering ' . __METHOD__ . '(' . $saveMapping . ') method ...');
$db = \App\Db::getInstance();
$fields = self::$allFields;
Method getFieldInstanceByName
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFieldInstanceByName($name)
{
$moduleName = $this->getModule()->getName(true);
$fieldsLabel = $this->getEditFields();
$params = ['uitype' => 1, 'column' => $name, 'name' => $name, 'label' => $fieldsLabel[$name], 'displaytype' => 1, 'typeofdata' => 'V~M', 'presence' => 0, 'isEditableReadOnly' => false];
Method getListViewEntries
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getListViewEntries($pagingModel)
{
$module = $this->getModule();
$parentModuleName = $module->getParentName();
$qualifiedModuleName = 'PDF';
Method request
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function request(App\Request $request)
{
$rows = [];
$query = $this->getQuery($request);
$query->from('s_#__mail_rbl_request')->select(['id', 'status', 'type', 'datetime', 'user', 'header', 'body']);
Method duplicate
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function duplicate(App\Request $request)
{
$response = new Vtiger_Response();
$moduleName = $request->getModule(false);
$result = true;
Method queueScheduledWorkflowTasks
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function queueScheduledWorkflowTasks()
{
$default_timezone = App\Config::main('default_timezone');
$vtWorflowManager = new VTWorkflowManager();
$taskQueue = new VTTaskQueue();
Method getNextTriggerTimeForWeekly
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getNextTriggerTimeForWeekly($scheduledDaysOfWeek, $scheduledTime)
{
$weekDays = ['1' => 'Monday', '2' => 'Tuesday', '3' => 'Wednesday', '4' => 'Thursday', '5' => 'Friday', '6' => 'Saturday', '7' => 'Sunday'];
$currentTime = time();
$currentWeekDay = date('N', $currentTime);
Method doTask
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function doTask($recordModel)
{
if (empty($this->url) || empty($this->format) || empty($this->typedata)) {
return;
}
Method save
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function save()
{
$db = \App\Db::getInstance();
$currentUserModel = Users_Record_Model::getCurrentUserModel();
Method getChildSales
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getChildSales($id, &$childSalesProcesses, $depthBase)
{
\App\Log::trace('Entering getChildSales(' . $id . ',' . $depthBase . ') method ...');
if (empty($id) || $depthBase == App\Config::module('SSalesProcesses', 'MAX_HIERARCHY_DEPTH')) {
\App\Log::error('Exiting getChildSales method ... - exceeded maximum depth of hierarchy');
Method entityChangeState
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function entityChangeState(App\EventHandler $eventHandler)
{
if (!ModTracker::isTrackingEnabledForModule($eventHandler->getModuleName())) {
return false;
}
Method getTreeWorkflows
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getTreeWorkflows(string $moduleName, int $recordId): array
{
\Vtiger_Loader::includeOnce('~~modules/com_vtiger_workflow/include.php');
$tree = [];
$workflowModuleName = 'Settings:Workflows';
Method add
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function add(App\Request $request)
{
$moduleName = $request->getByType('sourceModule', \App\Purifier::ALNUM);
$data = $request->getMultiDimensionArray('form', [
'data' => 'Text',
Method process
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$moduleName = $request->getModule();
$detailModel = Vtiger_DetailView_Model::getInstance($moduleName, $request->getInteger('record'));
$recordModel = $detailModel->getRecord();
Method getHistory
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getHistory()
{
$results = (new \App\Db\Query())->from('u_#__browsinghistory')
->where(['userid' => App\User::getCurrentUserId()])
->orderBy(['id' => SORT_DESC])
Method process
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
$this->loadConfig();
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\Gus', $this->config['moduleName']);
if (!$recordCollector->isActive()) {
Method getHierarchyData
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getHierarchyData($id, $baseInfo, $recordId, &$listviewEntries, $getRawData = false, $getLinks = true)
{
\App\Log::trace('Entering getHierarchyData(' . $id . ',' . $recordId . ') method ...');
$currentUser = Users_Privileges_Model::getCurrentUserModel();
$hasRecordViewAccess = $currentUser->isAdminUser() || \App\Privilege::isPermitted('Contacts', 'DetailView', $recordId);
Method getWidgetData
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getWidgetData($moduleName, $widgetParam, $time)
{
$currentUserId = \App\User::getCurrentUserId();
$s = new \yii\db\Expression('sum(sum_gross)');
$queryGenerator = new \App\QueryGenerator($moduleName);
Method read
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function read()
{
$defaultCharset = App\Config::main('default_charset');
$filePath = $this->getFilePath();
Function modalFormEdit
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
modalFormEdit(wizardContainer) {
const thisInstance = this;
$('#massEditHeader.modal-title').text(app.vtranslate('JS_EDIT_WIDGET'));
app.showPopoverElementView(wizardContainer.find('.js-help-info'));
let type = thisInstance.getType();