Showing 4,652 of 306,333 total issues
Consider simplifying this complex logical expression. Open
Open
if (null !== $value && (0 === $value || '0' === $value || 'off' === strtolower($value) || 'no' === strtolower($value) || false === $value)) {
return App\Language::translate('LBL_NO', $this->getFieldModel()->getModuleName());
}
Consider simplifying this complex logical expression. Open
Open
if (!isset($this->privileges['Unlock'])) {
$this->privileges['Unlock'] = !$this->isNew() && $this->isPermitted('EditView') && $this->isPermitted('OpenRecord')
&& false === Users_Privileges_Model::checkLockEdit($this->getModuleName(), $this) && !$this->isLockByFields() && !empty($this->getUnlockFields(true));
}
Consider simplifying this complex logical expression. Open
Open
if (!(('Archived' === $request->getByType('state') && $this->record->privilegeToArchive()) ||
('Trash' === $request->getByType('state') && $this->record->privilegeToMoveToTrash()) ||
('Active' === $request->getByType('state') && $this->record->privilegeToActivate()))
) {
throw new \App\Exceptions\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406);
Consider simplifying this complex logical expression. Open
Open
if ($attach || $emailPdf || ($countTemplates > 1 || (1 === $countTemplates && !isset($skip[$templateId]) && $countRecords > 1))) {
$fileName = ($pdf->getFileName() ?: time());
$increment[$fileName] = $increment[$fileName] ?? 0;
$fileName .= ($increment[$fileName]++ > 0 ? '_' . $increment[$fileName] : '') . '.pdf';
Consider simplifying this complex logical expression. Open
Open
if ($moduleField->isActiveField() &&
'vtiger_entity_stats' !== $moduleField->getTableName() &&
!\in_array($moduleField->getColumnName(), ['modifiedby', 'modifiedtime']) &&
!\in_array($moduleField->getUIType(), [70, 4]) &&
0 !== strcasecmp($moduleField->getFieldDataType(), 'autogenerated') &&
Consider simplifying this complex logical expression. Open
Open
if ((!$recordModel->isEmpty('addresslevel5' . $typeAddress) || !$recordModel->isEmpty('addresslevel4' . $typeAddress) || !$recordModel->isEmpty('addresslevel3' . $typeAddress) || !$recordModel->isEmpty('addresslevel2' . $typeAddress)) && ($recordModel->isNew() || \in_array($typeAddress, $typeAddressToUpdate))) {
$isCoordinateExists = (new App\Db\Query())
->from('u_#__openstreetmap_record_updater')
->where(['type' => $typeAddress, 'crmid' => $recordModel->getId()])
->exists();
Consider simplifying this complex logical expression. Open
Open
if (($isCreate = $recordModel->isCreate()) || $recordModel->isUpdate() || $recordModel->isTransferEdit()) {
$data = [];
foreach ($recordModel->getFieldInstances() as $fieldModel) {
if ($fieldModel && ($fieldInstance = $fieldModel->getFieldInstance())) {
\Api\WebserviceStandard\Fields::loadWebserviceByField($fieldInstance, $this);
Function getInstance
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
getInstance: function (parentId, parentModule, selectedRelatedTabElement, relatedModuleName, url) {
Function addRelationBetweenRecords
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
addRelationBetweenRecords: function (relatedModule, relatedModuleRecordId, selectedTabElement, params = {}, url) {
Function saveWidget
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
saveWidget: function (form, mode, sourceModule, linkid, type) {
Function enableCopyAddressFromModule
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
enableCopyAddressFromModule: function (moduleName, formElement, className, fieldName, label) {
Method register
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function register(string $prefix, string $name = '', ?bool $isDefault = false, bool $isActive = true, int $progress = 0)
Method register
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function register($name, $label = '', $isdefault = false, $isactive = true, $overrideCore = false)
Method updateField
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function updateField($blocknode, $blockInstance, $moduleInstance, $fieldnode, $fieldInstance)
Method saveRule
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function saveRule($forModule, $ruleId, $permission, $sourceId, $targetId)
Method getAllModules
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
Method getDisplayValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function getDisplayValue(\Vtiger_Field_Model $fieldModel, $value, int $recordId, array $rowData, $length = 65000)
Method addCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addCondition($fieldName, $value, $operator, $groupAnd = true, $userFormat = false)
Method translate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function translate(string $key, string $moduleName = '_Base', ?string $language = null, bool $encode = true, ?string $secondModuleName = null)
Method populateSharingPrivileges
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function populateSharingPrivileges($enttype, $userId, $module, $pertype, $varArr = false)