Showing 4,652 of 306,333 total issues
Method process
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(OSSMail_Mail_Model $mail)
{
$mailId = $mail->getMailCrmId();
$returnIds = [];
if (!$mailId) {
Method updateRecords
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function updateRecords($recordModel, $relatedData, $fieldValue)
{
$relatedModuleName = $relatedData[0];
$relatedFieldName = $relatedData[1];
$targetModel = Vtiger_RelationListView_Model::getInstance($recordModel, $relatedModuleName);
Method doTask
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function doTask($recordModel)
{
[$referenceField, $moduleName, $fieldName] = explode('::', $this->targetField);
$relationFieldModel = $recordModel->getModule()->getFieldByName($referenceField);
$ids = [];
Method showSlaPolicyView
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function showSlaPolicyView(App\Request $request)
{
$moduleName = $request->getModule();
$relatedModuleName = $request->getByType('target', \App\Purifier::ALNUM);
$rows = \App\Utils\ServiceContracts::getSlaPolicyForServiceContracts($request->getInteger('record'), \App\Module::getModuleId($relatedModuleName));
Method importICS
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function importICS(string $filePath)
{
$userId = \App\User::getCurrentUserRealId();
$lastImport = new ICalLastImport();
$lastImport->clearRecords($userId);
Method recordUpdate
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function recordUpdate(Vtiger_Record_Model $record, $cal)
{
\App\Log::trace(__METHOD__ . ' | Start Cal ID:' . $cal['crmid']);
$calendar = \App\Integrations\Dav\Calendar::loadFromContent($cal['calendardata'], $record, $cal['uid']);
foreach ($calendar->getRecordInstance() as $recordModel) {
Method process
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$currentUserId = \App\User::getCurrentUserId();
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
Method process
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
$html = '';
$scheduleData = \Vtiger_Watchdog_Model::getWatchingModulesSchedule($this->textParser->getParam('userId'), true);
if (!$scheduleData) {
Method getQueryByModuleField
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getQueryByModuleField($sourceModule, $field, $record, App\QueryGenerator $queryGenerator)
{
$supportedModulesList = [$this->getName(), 'Vendors', 'Leads', 'Accounts', 'PriceBooks'];
if (\in_array($sourceModule, $supportedModulesList) || Vtiger_Module_Model::getInstance($sourceModule)->isInventory()) {
$condition = ['and', ['vtiger_products.discontinued' => 1]];
Method getLinks
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getLinks(): array
{
$links = [];
if ($this->record->isEditable() && \App\Mail::checkInternalMailClient()) {
$links[] = Vtiger_Link_Model::getInstanceFromValues([
Method process
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$moduleName = $request->getModule();
$viewer = $this->getViewer($request);
if ($request->has('record')) {
Method process
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
\App\Log::trace('Start cron CalDAV');
if(!\App\YetiForce\Shop::check('YetiForceDav')){
$this->logs = \App\YetiForce\Shop::checkAlert('YetiForceDav');
Method getQueryGenerator
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getQueryGenerator(string $moduleName, array $actions, array $dateRange, ?int $owner, ?int $historyOwner, ?Vtiger_Paging_Model $pagingModel = null): App\QueryGenerator
{
$queryGenerator = (new \App\QueryGenerator($moduleName))
->setFields([])
->addJoin([
Method loadAnnouncements
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function loadAnnouncements()
{
$queryGenerator = new \App\QueryGenerator($this->getName());
$queryGenerator->setFields(['id', 'subject', 'description', 'assigned_user_id', 'createdtime', 'is_mandatory', 'interval']);
$query = $queryGenerator->createQuery();
Method reviewChanges
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function reviewChanges(App\Request $request)
{
$moduleName = $request->getModule();
$sourceModule = $request->getByType('sourceModule', 2);
$request->set('module', $sourceModule);
Method getConvertLeadMappedField
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getConvertLeadMappedField($fieldName, $moduleName)
{
$mappingFields = $this->get('mappingFields');
if (!$mappingFields) {
Method getTextParserDisplayValue
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getTextParserDisplayValue($value, Vtiger_Record_Model $recordModel, $params)
{
$value = \App\Json::decode($value);
if (!$value) {
return '';
Method getTreeList
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getTreeList()
{
$tree = [];
$lastId = 0;
$dataReader = (new App\Db\Query())
Method calculateAverage
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function calculateAverage()
{
if ('avg' === $this->valueType) {
foreach ($this->data as $dividingValue => &$dividing) {
foreach ($dividing as $groupValue => &$group) {
Method loadRowData
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function loadRowData(int $recordId, array $params = []): array
{
$recordModel = Vtiger_Record_Model::getInstanceById($recordId);
$recordModuleName = $recordModel->getModuleName();
$data = [