Showing 4,652 of 306,333 total issues
Method addRelation
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function addRelation($sourceRecordId, $destinationRecordId, $params = false)
{
$return = false;
if (!\is_array($destinationRecordId)) {
$destinationRecordId = [$destinationRecordId];
Method process
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$moduleName = $request->getModule();
$nameFiles = $request->getArray('nameFile', 'Text');
$ids = [];
Method entityAfterSave
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function entityAfterSave(App\EventHandler $eventHandler)
{
$recordModel = $eventHandler->getRecordModel();
if ($recordModel->isNew()) {
(new \App\BatchMethod(['method' => 'Project_Module_Model::updateProgress', 'params' => [$recordModel->get('projectmilestoneid')]]))->save();
Method process
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$moduleName = $request->getModule();
$srecord = $request->getInteger('srecord');
$smodule = $request->getByType('smodule');
Method getSearchViewList
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getSearchViewList($moduleName, $cvId, $fieldName = 'id'): array
{
$queryGenerator = new App\QueryGenerator($moduleName);
$queryGenerator->initForCustomViewById($cvId);
Method getDbConditionBuilderValue
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getDbConditionBuilderValue($value, string $operator)
{
$values = [];
if (!\is_array($value)) {
$value = $value ? explode('##', $value) : [];
Method duplicateValueFromRecord
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function duplicateValueFromRecord(&$value, App\Request $request): bool
{
$fieldName = $this->getFieldModel()->getName();
$recordModel = Vtiger_Record_Model::getInstanceById($request->getInteger('_duplicateRecord'), $request->getModule());
$copyValue = $recordModel->get($fieldName);
Method getWatchingUsers
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getWatchingUsers($restrictUsers = [])
{
if (!$this->watchingUsers) {
$users = $this->getModuleUsers();
if ($this->has('record')) {
Method getRecordsListFromRequest
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRecordsListFromRequest(App\Request $request)
{
$cvId = $request->getByType('cvid', 2);
$selectedIds = $request->getArray('selected_ids', 2);
$excludedIds = $request->getArray('excluded_ids', 2);
Method showAdvancedSearch
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function showAdvancedSearch(App\Request $request)
{
if (!\App\User::getCurrentUserModel()->getRoleInstance()->get('globalsearchadv')) {
throw new \App\Exceptions\NoPermitted('LBL_PERMISSION_DENIED', 406);
}
Method process
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$ajax = $request->isAjax();
$moduleName = $request->getModule();
$this->viewName = $request->has('viewName') ? $request->getByType('viewName', \App\Purifier::ALNUM) : App\CustomView::getInstance($moduleName)->getViewId();
Method getAdvftCriteria
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAdvftCriteria(CustomView $cv)
{
$columnindex = 0;
$advft_criteria = [];
$i = 1;
Method editViewPreSave
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function editViewPreSave(App\EventHandler $eventHandler)
{
$recordModel = $eventHandler->getRecordModel();
$response = ['result' => true];
$values = [];
Method debugRequest
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function debugRequest(): void
{
if (\App\Config::debug('apiLogAllRequests')) {
$log = '============ Request ' . \App\RequestUtil::requestId() . ' (Controller) ====== ' . date('Y-m-d H:i:s') . " ======\n";
$log .= 'REQUEST_METHOD: ' . \App\Request::getRequestMethod() . PHP_EOL;
Method getEntity
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getEntity()
{
$dataReader = $this->getQuery()->createCommand()->query();
$result = [];
$moduleModel = Vtiger_Module_Model::getInstance($this->getModuleName());
Function updateCustomView
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateCustomView: function (target) {
const thisInstance = this;
let params = {},
relatedModule = $(target).closest('.relatedModule'),
progressIndicatorElement = $.progressIndicator({
Function registerGlobalPermissionActionsEvent
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerGlobalPermissionActionsEvent: function () {
var editAllAction = jQuery('[name="editall"]').filter(':checkbox');
var viewAllAction = jQuery('[name="viewall"]').filter(':checkbox');
if (editAllAction.is(':checked')) {
Function updateModuleStatus
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateModuleStatus: function (currentTarget) {
var aDeferred = jQuery.Deferred();
var forModule = currentTarget.data('module');
var status = currentTarget.is(':checked');
Function registerAddModal
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerAddModal() {
$('.js-add-board').on('click', (e) => {
app.showModalWindow(
null,
'index.php?module=Kanban&parent=Settings&view=AddModal&sourceModule=' + this.module,
Function registerBuyModalForms
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerBuyModalForms(companyForm, buyForm) {
if (companyForm.validationEngine('validate') === true) {
let formData = companyForm.serializeFormData();
const progressIndicatorElement = $.progressIndicator({
blockInfo: { enabled: true }