Showing 4,652 of 306,333 total issues
Method process
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
if (!$this->textParser->recordModel || !$this->textParser->recordModel->getModule()->isInventory()) {
return '';
}
Method validateValue
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function validateValue(string $fieldName, $value)
{
switch ($fieldName) {
case 'name':
$itemPropertyModel = $this->getFieldInstanceByName($fieldName);
Method getBacktrace
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getBacktrace($minLevel = 1, $maxLevel = 0, $sep = '#')
{
$trace = '';
foreach (debug_backtrace() as $k => $v) {
if ($k < $minLevel) {
Method reloadApprovals
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function reloadApprovals(int $contactId): array
{
if (\App\Record::isExists($contactId)) {
$moduleName = 'ApprovalsRegister';
$relatedModule = 'Approvals';
Method process
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$recordId = $request->getInteger('id');
$pdfModel = Vtiger_PDF_Model::getInstanceById($recordId);
Method process
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$result = false;
$fileContent = '';
if ($request->isEmpty('type') || $request->isEmpty('libraryName')) {
Method saveWidget
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function saveWidget($params)
{
$db = App\Db::getInstance();
$tabid = $params['tabid'];
$data = $params['data'];
Method getRecordLinks
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRecordLinks(): array
{
$links = [];
$recordLinks = [
Method getParent
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getParent($id, &$parent, &$encountered, $depthBase = 0)
{
if ($depthBase == App\Config::module('Partners', 'MAX_HIERARCHY_DEPTH')) {
\App\Log::error('Exiting getParent method ... - exceeded maximum depth of hierarchy');
Method saveToDb
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function saveToDb(string $source, int $type, string $content): array
{
$firstLine = true;
$explodedElements = explode($this->delimiter, $content);
$db = \App\Db::getInstance('admin');
Method getValuesToSave
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getValuesToSave(array $data): array
{
$forSave = [];
if (!$this->getId()) {
$forSave[$this->getModule()->baseTable][$this->getModule()->baseIndex] = \App\Db::getInstance('admin')->getUniqueId('vtiger_users');
Method doTask
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function doTask($recordModel)
{
$mailerContent = [
'smtp_id' => ($this->smtp) ? $this->smtp : App\Mail::getDefaultSmtp(),
];
Method delete
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function delete()
{
switch ($this->typeSaving) {
case self::UPDATE_ALL_EVENTS:
$records = $this->getRecords($this->recordModel->get('followup'));
Method __getChildAccounts
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __getChildAccounts($id, &$childAccounts, $depthBase)
{
\App\Log::trace('Entering __getChildAccounts(' . $id . ',' . $depthBase . ') method ...');
if (empty($id) || $depthBase == App\Config::module('Accounts', 'MAX_HIERARCHY_DEPTH')) {
\App\Log::error('Exiting __getChildAccounts method ... - exceeded maximum depth of hierarchy');
Method getNotificationByRecipient
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getNotificationByRecipient($time)
{
$accessibleUsers = \App\Fields\Owner::getInstance()->getAccessibleUsers();
$moduleName = 'Notification';
$listViewUrl = Vtiger_Module_Model::getInstance($moduleName)->getListViewUrl();
Method process
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$baseModuleName = 'Accounts';
$viewer = $this->getViewer($request);
$filter = $request->has('filter') ? $request->getByType('filter', 'Alnum') : \App\CustomView::getInstance($baseModuleName)->getViewId();
Method getNotificationBySender
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getNotificationBySender($time)
{
$accessibleUsers = \App\Fields\Owner::getInstance()->getAccessibleUsers();
$moduleName = 'Notification';
$listViewUrl = Vtiger_Module_Model::getInstance($moduleName)->getListViewUrl();
Method process
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$dates = [];
$moduleName = $request->getModule();
$currentDate = DateTimeField::convertToDBFormat($request->getByType('currentDate', 'DateInUserFormat'));
Method getStructure
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getStructure()
{
if (!empty($this->structuredValues)) {
return $this->structuredValues;
}
Method searchAccountsToConvert
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function searchAccountsToConvert(Vtiger_Record_Model $recordModel)
{
\App\Log::trace('Start ' . __METHOD__);
if ($recordModel) {
$mappingFields = Vtiger_Processes_Model::getConfig('marketing', 'conversion', 'mapping');