Showing 4,652 of 306,333 total issues
Method getRelatedRecords
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getRelatedRecords($record, $hierarchy)
{
$moduleName = Record::getType($record);
$records = $recordsLevel1 = $recordsLevel2 = [];
if (\in_array(0, $hierarchy)) {
Method process
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(): int
{
$query = (new \App\Db\Query())->from('dbo.KONTRAHENT');
$pauser = \App\Pauser::getInstance('WaproAccountLastId');
if ($val = $pauser->getValue()) {
Method process
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(): int
{
$query = (new \App\Db\Query())->from('dbo.KONTAKT');
$pauser = \App\Pauser::getInstance('WaproContactsLastId');
if ($val = $pauser->getValue()) {
Method getListViewEntries
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getListViewEntries($pagingModel)
{
$module = $this->getModule();
$parentModuleName = $module->getParentName();
if (!empty($parentModuleName)) {
Method download
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function download(string $name): bool
{
$returnVal = true;
if (!static::$libraries[$name]) {
App\Log::warning('Library does not exist: ' . $name, 'Library');
Method process
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$db = \App\Db::getInstance('log');
$currentUser = \App\User::getCurrentUserModel();
$baseUserId = $currentUser->getId();
Method save
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function save(App\Request $request)
{
$blockId = $request->get('blockid');
$sourceModule = $request->getByType('sourceModule', 2);
$modueInstance = Vtiger_Module_Model::getInstance($sourceModule);
Method uploadTempFile
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function uploadTempFile(array $files, int $recordId, ?string $hash = null)
{
$db = \App\Db::getInstance();
$attach = [];
$maxSize = $this->getFieldInfo()['maxFileSize'];
Method process
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$qualifiedModuleName = $request->getModule(false);
$recordId = $request->get('record');
$roleName = $request->get('rolename');
Method process
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
$config = OSSMailScanner_Record_Model::getConfig('cron');
$duration = $config['time'] ?? 0;
$email = $config['email'] ?? '';
Method getTypeEmail
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getTypeEmail($returnText = false)
{
if (isset($this->mailType)) {
if ($returnText) {
$cacheKey = 'Received';
Method getProductsServices
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getProductsServices(App\Request $request, Vtiger_Viewer $viewer)
{
$fromModule = $request->getByType('fromModule', 'Text');
$record = $request->getInteger('record');
$mod = current($request->getArray('mod', 'Alnum'));
Method getChild
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getChild($id, &$childRow, $depthBase)
{
\App\Log::trace('Entering getChild(' . $id . ',' . $depthBase . ') method ...');
if (empty($id) || $depthBase == App\Config::module('MultiCompany', 'MAX_HIERARCHY_DEPTH')) {
\App\Log::error('Exiting getChild method ... - exceeded maximum depth of hierarchy');
Method getChild
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getChild(int $id, array &$childRow, int $depthBase)
{
\App\Log::trace('Entering getChild(' . $id . ',' . $depthBase . ') method ...');
if (empty($id) || $depthBase == App\Config::module('Competition', 'MAX_HIERARCHY_DEPTH')) {
\App\Log::error('Exiting getChild method ... - exceeded maximum depth of hierarchy');
Method getEstimatedValue
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getEstimatedValue($owner = false)
{
$moduleName = 'SSalesProcesses';
$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
$query = (new \App\Db\Query())->select([
Method setMessagesResult
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setMessagesResult(App\Request $request)
{
if ($request->has('roomType') && $request->has('recordId')) {
$roomType = $request->getByType('roomType');
$recordId = $request->getInteger('recordId');
Method process
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$moduleName = $request->getModule();
$record = $request->getInteger('record');
$load = $request->get('noloadlibs');
Method getAdvancedFilterOptions
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getAdvancedFilterOptions()
{
return [
'is' => 'is',
'is not' => 'is not',
Method getHistory
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getHistory(App\Request $request, Vtiger_Paging_Model $pagingModel)
{
$recordId = $request->getInteger('record');
if ($request->isEmpty('type')) {
return [];
Method getChildIStorages
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getChildIStorages($id, &$childIStorages, $depthBase)
{
\App\Log::trace('Entering getChildIStorages(' . $id . ',' . $depthBase . ') method ...');
if (empty($id) || $depthBase === App\Config::module('IStorages', 'MAX_HIERARCHY_DEPTH')) {