Showing 4,652 of 306,333 total issues
Method process
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
if (!$this->textParser->recordModel || !$this->textParser->recordModel->getModule()->isInventory()) {
return '';
}
Method calculate
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function calculate()
{
if (!\App\RequestUtil::isNetConnection()) {
throw new \App\Exceptions\AppException('ERR_NO_INTERNET_CONNECTION');
}
Method find
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function find($value)
{
if (empty($value) || !\App\RequestUtil::isNetConnection()) {
return [];
}
Method validate
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function validate(string $type)
{
$main = static::parse($type);
$cron = static::getCronVariables($type);
foreach (static::${$type} as $key => &$item) {
Method loadFromContent
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function loadFromContent(string $contents, $name = false, array $param = [])
{
if (empty($contents)) {
Log::warning("Empty content, unable to create file: $name | Size: " . \strlen($contents), __CLASS__);
return false;
Method getUsersByGroup
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getUsersByGroup($groupId, $subGroups = false, $i = 0)
{
$cacheKey = $groupId . (false === $subGroups ? '' : '#');
if (Cache::has('getUsersByGroup', $cacheKey)) {
return Cache::get('getUsersByGroup', $cacheKey);
Method change
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function change(App\Request $request): void
{
$moduleName = $request->getModule();
$password = $request->getRaw('password');
$userRecordModel = Users_Record_Model::getInstanceById($request->getInteger('record'), $moduleName);
Method process
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$mode = $request->getMode();
if (!empty($mode)) {
$this->invokeExposedMethod($mode, $request);
Method getRecordLinks
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRecordLinks(): array
{
$links = [];
$recordLinks = [
[
Method process
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$step = $request->getByType('step', 2);
if ($request->isEmpty('record', true)) {
$pdfModel = Settings_PDF_Record_Model::getCleanInstance($request->getByType('module_name', 2));
Method process
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
if ($mode = $request->getMode()) {
$this->invokeExposedMethod($mode, $request);
} else {
Method importTaskMethod
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function importTaskMethod(array &$method, array &$messages)
{
$scriptData = base64_decode($method['script_content']);
$functionPath = $method['function_path'];
if (!$this->checkPathForImportMethod($functionPath)) {
Method setTileLayer
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setTileLayer(App\Request $request): void
{
$value = $request->getByType('vale', 'Text');
$oldValue = \App\Config::module('OpenStreetMap', 'tileLayerServer');
$all = \App\Config::module('OpenStreetMap', 'tileLayerServers');
Method process
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
\App\Log::trace(__METHOD__ . ' | Start');
$sourceModule = $request->getByType('sourceModule', 2);
$widgetsManagementModel = new Settings_WidgetsManagement_Module_Model();
Method doTask
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function doTask($recordModel)
{
$moduleName = $recordModel->getModuleName();
$recordId = $recordModel->getId();
switch ($this->recipients) {
Method getRelatedModuleRecordIds
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRelatedModuleRecordIds(App\Request $request, $recordIds, $relModData)
{
$basicModule = $request->getModule();
$parentModuleModel = Vtiger_Module_Model::getInstance($basicModule);
$relatedIds = [];
Method uploadTempFile
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function uploadTempFile(array $files, int $recordId)
{
$db = \App\Db::getInstance();
$attach = [];
$maxSize = $this->getFieldInfo()['maxFileSize'];
Method getLabelToDisplay
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getLabelToDisplay(array $row): string
{
$name = '';
$type = $row['type'];
if (\is_int($type)) {
Method changeState
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function changeState($state)
{
$db = \App\Db::getInstance();
$transaction = $db->beginTransaction();
try {
Method getValuesForSave
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getValuesForSave()
{
$moduleModel = $this->getModule();
$saveFields = $this->getModule()->getFieldsForSave($this);
$forSave = $this->getEntityDataForSave();