Showing 4,652 of 306,333 total issues
Method setDataFromRequest
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setDataFromRequest(App\Request $request)
{
foreach (array_keys($this->getEditFields()) as $field) {
if ($request->has($field)) {
switch ($field) {
Method save
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function save()
{
$db = App\Db::getInstance('webservice');
$table = $this->baseTable;
$index = $this->baseIndex;
Method getFormatDataSession
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFormatDataSession(array $row): array
{
foreach ($row as $key => $value) {
switch ($key) {
case 'parent_id':
Method showFieldLayout
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function showFieldLayout(App\Request $request)
{
$sourceModule = $request->getByType('sourceModule', 2);
$menuModelsList = \App\Module::getQuickCreateModules();
Method encryption
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function encryption(App\Request $request)
{
$method = $request->isEmpty('methods') ? '' : $request->getByType('methods', 'Text');
$vector = $request->getRaw('vector');
$pass = $request->getRaw('password');
Method doTask
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function doTask($recordModel)
{
if (!empty($this->mailTemplate) && !empty($this->pdfTemplate) && \App\Record::isExists($this->mailTemplate, 'EmailTemplates') && \Vtiger_PDF_Model::getInstanceById($this->pdfTemplate)) {
$mailerContent = [];
if (!empty($this->smtp)) {
Method deleteAllRecords
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function deleteAllRecords(string $untilModifiedTime, int $userId)
{
$actualUserId = App\User::getCurrentUserId();
try {
if (!App\User::isExists($userId)) {
Method calculateProgress
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function calculateProgress()
{
$db = \App\Db::getInstance();
$params = [];
Method process
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$this->preProcess($request);
$moduleName = $request->getModule();
$srcModule = $request->getByType('srcModule', 'Alnum');
Method getHeaders
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getHeaders()
{
$headerFields = parent::getHeaders();
if ('IStorages' === $this->getRelationModel()->get('modulename') && 'getManyToMany' === $this->getRelationModel()->get('name')) {
$qtyInStockField = new Vtiger_Field_Model();
Method davSync
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function davSync(): int
{
$create = $updates = 0;
foreach ($this->davUsers as $userId => $user) {
$this->calendarId = $user->get('calendarsid');
Method moduleHandler
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function moduleHandler($moduleName, $eventType)
{
$dbCommand = App\Db::getInstance()->createCommand();
if ('module.postinstall' === $eventType) {
$displayLabel = 'OSSMailView';
Method getDetailViewLinks
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getDetailViewLinks(array $linkParams): array
{
$linkModelList = parent::getDetailViewLinks($linkParams);
$recordModel = $this->getRecord();
if (!$recordModel->isReadOnly()) {
Method getPicklistValues
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getPicklistValues()
{
$params = $this->getFieldModel()->getFieldParams();
$condition = ['and',
['<>', 'vtiger_field.presence', 1],
Method getReferenceList
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getReferenceList()
{
if (isset($this->referenceList)) {
return $this->referenceList;
}
Method getRelationField
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRelationField()
{
if ($this->has('RelationField')) {
return $this->get('RelationField');
}
Method getQueryFields
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getQueryFields()
{
if ($this->has('QueryFields')) {
return $this->get('QueryFields');
}
Method isLockByFields
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function isLockByFields()
{
if (!isset($this->privileges['isLockByFields'])) {
$isLock = false;
$moduleName = $this->getModuleName();
Method initInventoryData
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function initInventoryData(array $items, bool $userFormat = true)
{
\App\Log::trace('Entering ' . __METHOD__);
$inventoryModel = Vtiger_Inventory_Model::getInstance($this->getModuleName());
$fields = $inventoryModel->getFields();
Method process
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$moduleName = $request->getModule();
$transferOwnerId = $request->getInteger('transferOwnerId');
$relatedModules = $request->getByType('related_modules', 'Text');