Showing 4,652 of 306,333 total issues
Method getMapping
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getMapping($editable = false)
{
if (empty($this->mapping)) {
$query = (new \App\Db\Query())->from('vtiger_convertleadmapping');
if ($editable) {
Method getDisplayValue
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getDisplayValue(string $key)
{
$value = $this->get($key);
switch ($key) {
case 'default':
Method createStep2
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function createStep2(App\Request $request)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
Method saveToDb
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function saveToDb()
{
$db = \App\Db::getInstance('admin');
$tablesData = $this->getValuesForSave();
$transaction = $db->beginTransaction();
Method updateMenu
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateMenu(App\Request $request)
{
$data = $request->getMultiDimensionArray('mdata', [
'id' => 'Integer',
'type' => 'Alnum',
Method validate
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function validate(array $data): array
{
if (isset($data['id'])) {
$data['id'] = \App\Purifier::purifyByType($data['id'], 'Integer');
}
Method getListViewEntries
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getListViewEntries($pagingModel)
{
$moduleModel = $this->getModule();
$moduleName = $moduleModel->getName();
$parentModuleName = $moduleModel->getParentName();
Method process
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$supportedModules = Settings_RecordNumbering_Module_Model::getSupportedModules();
$sourceModule = $request->getByType('sourceModule', 2);
$valueParam = $request->getByType('picklist', \App\Purifier::TEXT);
Method getAll
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getAll($moduleName = '')
{
$query = (new App\Db\Query())->from('com_vtiger_workflow_tasktypes');
$dataReader = $query->createCommand()->query();
while ($rawData = $dataReader->read()) {
Method getSideBarLinks
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getSideBarLinks($linkParams)
{
$links = Vtiger_Link_Model::getAllByType($this->getId(), ['SIDEBARLINK', 'SIDEBARWIDGET'], $linkParams);
$links['SIDEBARLINK'][] = Vtiger_Link_Model::getInstanceFromValues([
'linktype' => 'SIDEBARLINK',
Method getAllParentComments
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getAllParentComments(int $parentId, string $moduleName, array $hierarchy = [], Vtiger_Paging_Model $pagingModel = null)
{
$queryGenerator = new \App\QueryGenerator('ModComments');
$queryGenerator->setFields(array_merge(array_keys(\App\Field::getModuleFieldInfosByPresence('ModComments')), ['id']));
$queryGenerator->setSourceRecord($parentId);
Method getInventoryChanges
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getInventoryChanges()
{
if (!isset($this->inventoryChanges)) {
$changes = [];
if ($this->isCreate() || $this->isUpdate() || $this->isTransferEdit()) {
Method getQueryByModuleField
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getQueryByModuleField($sourceModule, $field, $record, App\QueryGenerator $queryGenerator)
{
if (!empty($record) && \in_array($sourceModule, ['Campaigns', 'Products', 'Services'])) {
switch ($sourceModule) {
case 'Campaigns':
Method getRecurringInfo
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getRecurringInfo($value)
{
$result = [];
if ($value) {
$values = explode(';', $value);
Method getDisplayValue
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
{
$value = \App\Json::decode($value);
if (!$value) {
return '';
Method saveField
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function saveField(Vtiger_Basic_InventoryField $fieldModel): bool
{
$db = \App\Db::getInstance();
$tableName = $this->getTableName();
if (!$fieldModel->has('sequence')) {
Method getConfig
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getConfig($process, $type, $procesParam = false)
{
\App\Log::trace('Start ' . __METHOD__ . " | Process: $process, Type: $type");
$processList = [
'marketing' => 'yetiforce_proc_marketing',
Method getRecords
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getRecords()
{
$selectedRecords = $this->getSelectedRecords();
$isDeletable = $this->isDeletable();
if (2 == $this->getRelationType()) {
Method showMassEditForm
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function showMassEditForm(App\Request $request)
{
$moduleName = $request->getModule();
$viewer = $this->getViewer($request);
$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
Method getListViewCount
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getListViewCount(App\Request $request)
{
$moduleName = $request->getModule();
if (!$this->listViewModel) {
$cvId = App\CustomView::getInstance($moduleName)->getViewId();