Showing 4,652 of 306,333 total issues
Method getRelatedSummary
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRelatedSummary(App\Db\Query $query)
{
$totalTime = $query->limit(null)->orderBy('')->sum('vtiger_osstimecontrol.sum_time');
$userTime = [
Method getLinks
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getLinks(): array
{
$relatedLink = parent::getLinks();
if (!$this->getParentRecordModel()->isReadOnly()) {
$relationModelInstance = $this->getRelationModel();
Method send
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function send(App\Request $request)
{
$roomType = $request->getByType('roomType');
$recordId = $request->getInteger('recordId');
$chat = \App\Chat::getInstance($roomType, $recordId);
Method moduleHandler
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function moduleHandler($moduleName, $eventType)
{
require_once 'include/utils/CommonUtils.php';
require_once 'include/fields/DateTimeField.php';
require_once 'include/fields/DateTimeRange.php';
Method findRecordsById
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function findRecordsById($ids)
{
$return = false;
if (!empty($ids)) {
$recordModelMailScanner = Vtiger_Record_Model::getCleanInstance('OSSMailScanner');
Method getDetailViewLinks
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getDetailViewLinks(array $linkParams): array
{
if ($this->getRecord()->isReadOnly() || \App\RequestUtil::getBrowserInfo()->ie) {
return parent::getDetailViewLinks($linkParams);
}
Method trackRelation
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function trackRelation($sourceModule, $sourceId, $targetModule, $targetId, $type)
{
$db = App\Db::getInstance();
$currentUser = Users_Record_Model::getCurrentUserModel();
$currentTime = date('Y-m-d H:i:s');
Method validate
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function validate($value, $isUserFormat = false)
{
if (empty($value)) {
return;
}
Method getApiDisplayValue
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getApiDisplayValue($value, Vtiger_Record_Model $recordModel, array $params = [])
{
$return = [];
if ($recordModel && !empty($value)) {
if ('I' === $recordModel->getValueByField('filelocationtype')) {
Method getValueToExport
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getValueToExport($value, int $recordId)
{
$multiMode = 'multiImage' === $this->getFieldModel()->getFieldDataType();
if (\is_string($value)) {
$value = \App\Json::isEmpty($value) ? [] : \App\Json::decode($value);
Method getProgressHeader
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getProgressHeader(Vtiger_Record_Model $recordModel): array
{
$fieldModel = $this->getFieldModel();
$fieldName = $fieldModel->getName();
$moduleName = $fieldModel->getModuleName();
Method checkPwd
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function checkPwd(string $value)
{
$conf = Settings_Password_Record_Model::getUserPassConfig();
$fieldConfig = $this->getFieldModel()->getFieldParams()['validate'] ?? [];
$notice = [];
Method getBasicLinks
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getBasicLinks()
{
$basicLinks = [];
$moduleModel = $this->getModule();
Method deleteField
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function deleteField(string $fieldName): bool
{
$db = \App\Db::getInstance();
$dbCommand = $db->createCommand();
$transaction = $db->beginTransaction();
Method getEntries
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getEntries(): array
{
$entries = [];
$addInventoryData = $this->fullData && $this->moduleInstance->isInventory();
if ($addInventoryData) {
Method processWizard
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function processWizard(App\Request $request)
{
$moduleName = $request->getModule();
$recordModel = $this->record->getRecord();
$processWizardModel = Vtiger_ProcessWizard_Model::getInstance($recordModel);
Method showRecentComments
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function showRecentComments(App\Request $request)
{
if (!\App\Privilege::isPermitted('ModComments')) {
throw new \App\Exceptions\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406);
}
Method putDataIntoSpreadsheet
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function putDataIntoSpreadsheet(Vtiger_Field_Model $fieldModel, $value, int $id)
{
switch ($fieldModel->getFieldDataType()) {
case 'integer':
case 'double':
Method showDiscounts
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function showDiscounts(App\Request $request)
{
$moduleName = $request->getModule();
$discountType = $request->getInteger('discountType');
$currency = $request->getInteger('currency');
Method showRelatedProductsServices
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function showRelatedProductsServices(App\Request $request)
{
$recordId = $request->getInteger('record');
$moduleName = $request->getModule();
$recordModel = $this->record->getRecord();