Showing 4,652 of 306,333 total issues
Method row
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function row(App\Request $request): void
{
$sourceModuleName = $request->getByType('sourceModuleName', \App\Purifier::ALNUM);
$sourceField = $request->getByType('sourceField', \App\Purifier::ALNUM);
$sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModuleName);
Method process
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$fields = Settings_MailIntegration_ConfigForm_Model::getFields($request->getModule(false));
$field = $request->getByType('updateField');
if (!isset($fields[$field])) {
Method getNextTriggerTimeForMonthlyByDate
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getNextTriggerTimeForMonthlyByDate($scheduledDayOfMonth, $scheduledTime)
{
$currentDayOfMonth = date('j', time());
if ($scheduledDayOfMonth) {
$scheduledDaysOfMonth = \App\Json::decode($scheduledDayOfMonth);
Method getCalendarState
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getCalendarState($data = [])
{
if ($data) {
$activityStatus = $data['activitystatus'];
if (\in_array($activityStatus, self::getComponentActivityStateLabel('history'))) {
Method getExternalUrl
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getExternalUrl($moduleName = false, $record = false, $view = false, $type = false): string
{
$url = 'mailto:';
$request = new App\Request([]);
if ($moduleName) {
Method getChatConfig
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getChatConfig(App\Request $request)
{
$userRealID = \App\User::getCurrentUserRealId();
$userRoomPin = \App\Config::module('Chat', 'userRoomPin');
if (!$userRoomPin) {
Method process
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$widget = Vtiger_Widget_Model::getInstance($request->getInteger('linkid'), \App\User::getCurrentUserId());
Method getDisplayValue
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
{
if (empty($value)) {
return '';
}
Method getApiDisplayValue
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getApiDisplayValue($value, Vtiger_Record_Model $recordModel, array $params = [])
{
$value = \App\Json::decode($value);
if (!$value || !\is_array($value)) {
return [];
Method normalizeData
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function normalizeData()
{
foreach ($this->data as &$dividing) {
foreach ($dividing as $groupValueKey => &$values) {
// iterate data one more time to search other group values
Method getAddRelationLinks
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAddRelationLinks(): array
{
$relationModelInstance = $this->getRelationModel();
if (!$relationModelInstance->isAddActionSupported() || $this->getParentRecordModel()->isReadOnly()) {
return [];
Method save
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function save()
{
$eventHandler = $this->getEventHandler();
if ($this->getHandlerExceptions()) {
$eventHandler->setExceptions($this->getHandlerExceptions());
Method getImage
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getImage()
{
$image = [];
if (!$this->isEmpty('imagename') && \App\Json::isJson($this->get('imagename')) && !\App\Json::isEmpty($this->get('imagename'))) {
$image = \App\Json::decode($this->get('imagename'));
Method sanitizeInventoryValue
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function sanitizeInventoryValue($value, $columnName): string
{
if ($field = $this->inventoryFields[$columnName] ?? false) {
if (\in_array($field->getType(), ['Name', 'Reference'])) {
$value = trim($value);
Method process
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$moduleName = $this->record->getModuleName();
$dateTime = $request->getByType('dateTime', 'dateTimeInUserFormat');
$dateTime = \App\Fields\DateTime::formatToDb($dateTime);
Method convert
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function convert(array $entries): array
{
$columns = array_keys($this->columns);
$fieldName = $this->fieldModel->getName();
$columnCounter = $records = $sum = [];
Method setDataFromRequest
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setDataFromRequest(App\Request $request)
{
if ($request->has('xmlExportType')) {
$this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
}
Method getRelationPagination
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRelationPagination(App\Request $request)
{
$viewer = $this->getViewer($request);
$pageNumber = $request->getInteger('page');
$moduleName = $request->getModule();
Method process
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$records = $request->getArray('records', 'Integer');
$moduleName = $request->getModule();
$template = $request->getInteger('template');
Method process
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$moduleName = $request->getModule();
$viewId = $entityState = false;
$selectedIds = $request->getArray('selected_ids', 2);