Showing 4,652 of 306,333 total issues
Method testIncrementNumberDay
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testIncrementNumberDay()
{
$parts = explode('-', RecordNumber::$dates[0]);
$actualNumber = 1;
$prefix = '{{YYYY}}-{{MM}}-{{DD}}/';
Method process
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
$data = [];
[$relationId, $fields, $conditions, $limit, $orderBy, $relConditions] = array_pad($this->params, 6, '');
if (is_numeric($relationId)) {
Method htmlTruncateByWords
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function htmlTruncateByWords(string $html, int $length = 0, string $ending = '...'): string
{
if (!$length) {
$length = Config::main('listview_max_textlength');
}
Method init
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function init(string $type)
{
if (\App\Config::main('site_URL')) {
static::$crmUrl = \App\Config::main('site_URL');
} elseif (isset(\App\Process::$requestMode) && 'Install' === \App\Process::$requestMode) {
Method getGroups
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getGroups($addBlank = true, $private = '')
{
\App\Log::trace("Entering getGroups($addBlank,$private) method ...");
$moduleName = '';
if ('Settings' !== \App\Request::_get('parent') && $this->moduleName) {
Method findRecordByEmail
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function findRecordByEmail($value, array $allowedModules = [], array $skipModules = [])
{
$db = \App\Db::getInstance();
$rows = $fields = [];
$dataReader = (new \App\Db\Query())->select(['vtiger_field.columnname', 'vtiger_field.tablename', 'vtiger_field.fieldlabel', 'vtiger_field.tabid', 'vtiger_tab.name'])
Method setValuesForRecord
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setValuesForRecord(\Vtiger_Record_Model $record): void
{
$this->record = $record;
if (isset($this->card->N)) {
$head = $this->card->N->getParts();
Method enableOrDisableValuesForRole
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function enableOrDisableValuesForRole($picklistFieldName, $valuesToEnables, $valuesToDisable, $roleIdList)
{
$db = App\Db::getInstance();
$picklistId = (new App\Db\Query())->select(['picklistid'])->from('vtiger_picklist')
->where(['name' => $picklistFieldName])->scalar();
Method getListViewEntries
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getListViewEntries($pagingModel)
{
$moduleModel = $this->getModule();
$moduleName = $moduleModel->getName();
$parentModuleName = $moduleModel->getParentName();
Method getLastCronIteration
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getLastCronIteration()
{
$result = [];
$totalDiff = $finalLastStart = $finalLastEnd = $finishedTasks = 0;
$timedout = false;
Method getDefaultUserId
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getDefaultUserId($widgetModel, $moduleName = false, $owner = false)
{
\App\Log::trace('Entering ' . __METHOD__);
$currentUser = \App\User::getCurrentUserModel();
$user = '';
Method compare
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function compare(App\Request $request): array
{
$this->parseCsv->heading = false;
$this->parseCsv->auto($this->path);
$this->storage = $request->getInteger('storage');
Method saveToDb
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function saveToDb()
{
$db = \App\Db::getInstance();
$fileNameByField = 'filename';
if ('I' === $this->get('filelocationtype')) {
Method getParentSales
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getParentSales($id, &$parentSSalesProcesses, &$encounteredSalesProcesses, $depthBase = 0)
{
\App\Log::trace('Entering getParentSales(' . $id . ') method ...');
if ($depthBase == App\Config::module('SSalesProcesses', 'MAX_HIERARCHY_DEPTH')) {
Method getLeadsByIndustry
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getLeadsByIndustry($owner, $dateFilter)
{
$query = new \App\Db\Query();
$query->select([
'industryid' => 'vtiger_industry.industryid',
Method getStructure
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getStructure()
{
if (!empty($this->structuredValues)) {
return $this->structuredValues;
}
Method process
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$moduleName = $request->getModule();
$recordIds = self::getRecordsListFromRequest($request);
$skipped = [];
Method getOwners
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getOwners(App\Request $request): void
{
if (!App\Config::performance('SEARCH_OWNERS_BY_AJAX')) {
throw new \App\Exceptions\NoPermitted('LBL_PERMISSION_DENIED', 406);
}
Method process
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request, $widget = null)
{
$currentUser = Users_Record_Model::getCurrentUserModel();
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
Method getChild
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getChild(int $id, array &$childRow, int $depthBase): array
{
\App\Log::trace('Entering getChild(' . $id . ',' . $depthBase . ') method ...');
if (empty($id) || $depthBase === \App\Config::module('Project', 'MAX_HIERARCHY_DEPTH')) {
\App\Log::error('Exiting getChild method ... - exceeded maximum depth of hierarchy');