Showing 4,652 of 306,333 total issues
Method save
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function save(App\Request $request)
{
if ($request->isEmpty('record')) {
//get instance from currency name, Aleady deleted and adding again same currency case
$recordModel = Settings_Currency_Record_Model::getInstance($request->getByType('currency_name', 'Text'));
Method __getChildEmployees
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __getChildEmployees($id, &$childAccounts, $depth)
{
$userNameSql = App\Module::getSqlForNameInDisplayFormat('Users');
$dataReader = (new App\Db\Query())
->select(['vtiger_ossemployees.*', 'user_name' => new \yii\db\Expression('CASE when (vtiger_users.user_name not like ' . App\Db::getInstance()->quoteValue('') . ") THEN $userNameSql ELSE vtiger_groups.groupname END")])
Method getHeadLocks
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getHeadLocks()
{
$return = '';
foreach ($this->getLocks() as $lock) {
switch ($lock) {
Method saveRule
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function saveRule(App\Request $request)
{
Settings_Vtiger_Tracker_Model::lockTracking(false);
Settings_Vtiger_Tracker_Model::addBasic('save');
$forModule = $request->getByType('for_module', 2);
Method getRecordLinks
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRecordLinks(): array
{
$links = [];
$recordLinks = [
[
Method getChildMenu
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getChildMenu($roleId, $parent, int $source = 0)
{
$settingsModel = Settings_Menu_Module_Model::getInstance();
$menu = [];
$query = (new \App\Db\Query())->select(('yetiforce_menu.*, vtiger_tab.name'))
Method getValuesToSave
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getValuesToSave(array $data): array
{
if (!$this->getId()) {
$forSave[$this->getModule()->baseTable] = [];
}
Method getPickListView
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getPickListView(App\Request $request)
{
$pickListFields = $picklistValuesName = [];
$sourceModule = $request->getByType('source_module', 2);
$fieldId = $request->getInteger('fieldId');
Method toSend
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function toSend(App\Request $request)
{
$rows = [];
$query = $this->getQuery($request);
$query->from('s_#__mail_rbl_request')->select(['id', 'type', 'datetime', 'user', 'header']);
Method process
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(OSSMail_Mail_Model $mail)
{
$this->mail = $mail;
$ids = $this->findAndBind();
if ($ids) {
Method doTask
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function doTask($recordModel)
{
$referenceFields = $recordModel->getModule()->getFieldsByReference();
$referenceIds = [];
foreach ($referenceFields as $fieldModel) {
Method getCommentLinks
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getCommentLinks()
{
$links = [];
$stateColors = App\Config::search('LIST_ENTITY_STATE_COLOR');
if ($this->privilegeToArchive()) {
Method moduleHandler
has 29 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 = 'OSSMail';
Method uploadAndSaveFile
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function uploadAndSaveFile($fileDetails)
{
$id = $this->getId();
$moduleName = $this->getModuleName();
$result = false;
Method getListViewDisplayValue
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getListViewDisplayValue($value, $record = false, $recordModel = false, $rawText = false)
{
$value = \App\Json::decode($value);
if (!$value) {
return '';
Method getRecordsFromArray
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRecordsFromArray(array $rows)
{
$listViewRecordModels = $relatedFields = [];
$moduleModel = $this->getRelationModel()->getRelationModuleModel();
$recordId = $this->getParentRecordModel()->getId();
Method getDisplayValue
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
{
$extra = '';
$href = $international = \App\Purifier::encodeHtml($value);
if ((\Config\Main::$phoneFieldAdvancedVerification ?? false) && ($format = \App\Config::main('phoneFieldAdvancedHrefFormat', \libphonenumber\PhoneNumberFormat::RFC3966)) !== false) {
Method getDisplayValue
has 29 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 '';
}
Method getTreeList
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getTreeList()
{
$trees = [];
$lastId = 0;
$dataReader = (new App\Db\Query())
Method getWatchingMembers
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getWatchingMembers($getData = false)
{
$query = (new App\Db\Query())
->select(['member', 'lock', 'exceptions'])
->from('u_#__watchdog_module')