Showing 4,652 of 306,333 total issues
Method getCoordinates
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getCoordinates(array $addressInfo)
{
$product = \App\YetiForce\Register::getProduct('YetiForceMap');
if (empty($addressInfo) || !\App\RequestUtil::isNetConnection() || ((empty($product['params']['login']) || empty($product['params']['pass'])) && empty($product['params']['token']))) {
return false;
Method explode
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function explode($date, $format = false)
{
if (empty($format)) {
$format = 'yyyy-mm-dd';
}
Method create
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function create()
{
if (\array_diff_key($this->getData(), $this->template)) {
throw new Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE', 406);
}
Method addRoleToPicklist
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function addRoleToPicklist($fields): void
{
\App\Log::trace('Entering ' . __METHOD__);
$db = \App\Db::getInstance();
$schema = $db->getSchema();
Method confirm
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function confirm(App\Request $request): void
{
$result = false;
$responseType = 'error';
$message = \App\Language::translate('LBL_INVALID_VERIFICATION_CODE', $request->getModule(false));
Method save
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function save(App\Request $request)
{
$response = new Vtiger_Response();
$moduleName = $request->getModule(false);
$result = true;
Method getFields
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getFields(): array
{
$config = \App\Config::component('Mail', null, []);
$fields = [
'rcListCheckRbl' => [
Method getRenewalValue
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRenewalValue()
{
if ($this->isEmpty('serviceid') || !\App\Record::isExists($this->get('serviceid'), 'Services')) {
return 'PLL_NOT_APPLICABLE_VERIFICATION';
}
Method process
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$moduleName = $request->getModule();
$sourceRecord = $request->getInteger('sourceRecord');
$sourceModule = $request->getByType('sourceModule', 2);
Method updateMailBoxCounter
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function updateMailBoxCounter(array $users): array
{
if (empty($users)) {
return [];
}
Method saveAttachments
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function saveAttachments()
{
$userId = $this->getAccountOwner();
$useTime = $this->get('date');
$files = $this->get('files');
Method process
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$currentUser = \App\User::getCurrentUserModel();
$moduleName = $request->getModule();
$linkId = $request->getInteger('linkid');
Method process
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$currentUserId = \App\User::getCurrentUserId();
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
Method getUnreviewed
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getUnreviewed($recordsId, $userId = false, $sort = false)
{
if (false === $userId) {
$userId = \App\User::getCurrentUserId();
}
Method getSettingLinks
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getSettingLinks(): array
{
Vtiger_Loader::includeOnce('~~modules/com_vtiger_workflow/VTWorkflowUtils.php');
$settingsLinks = [];
if (\App\Security\AdminAccess::isPermitted('Workflows') && VTWorkflowUtils::checkModuleWorkflow($this->getName())) {
Method validate
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function validate($value, $isUserFormat = false)
{
if (empty($value) || isset($this->validate[$value])) {
return;
}
Method getDisplayValue
has 35 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 null;
}
Method getInstance
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getInstance($parentModuleModel, $relatedModuleModel, $relationId = false)
{
$relKey = $parentModuleModel->getId() . '_' . $relatedModuleModel->getId() . '_' . $relationId;
if (isset(self::$cachedInstances[$relKey])) {
return self::$cachedInstances[$relKey] ? clone self::$cachedInstances[$relKey] : self::$cachedInstances[$relKey];
Method getSummaryInfo
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getSummaryInfo()
{
$moduleName = $this->getModuleName();
$path = "modules/$moduleName/summary_blocks";
if (!is_dir($path)) {
Method process
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$record = $request->getInteger('record');
$recordModel = Vtiger_Record_Model::getInstanceById($record, $request->getModule());
if (!$recordModel->isViewable()) {