Showing 4,652 of 306,333 total issues
Function registerAutoComplete
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerAutoComplete() {
App.Fields.Picklist.showSelect2ElementView(this.select, {
ajax: {
data: function (item) {
return {
Function createCodeBlock
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var createCodeBlock = (PhpDebugBar.Widgets.createCodeBlock = function (code, lang, firstLineNumber, highlightedLine) {
var pre = $('<pre />').addClass(csscls('code-block'));
// Add a newline to prevent <code> element from vertically collapsing too far if the last
// code line was empty: that creates problems with the horizontal scrollbar being
// incorrectly positioned - most noticeable when line numbers are shown.
Function registerPinEvent
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerPinEvent: function () {
const self = this;
let pinButton = self.sidebar.find('.js-menu--pin');
let baseContainer = self.sidebar.closest('.js-base-container');
pinButton.on('click', () => {
Method initialize
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function initialize($valuemap, $module = false, $blockInstance = false)
{
$this->id = (int) $valuemap['fieldid'];
$this->tabid = (int) $valuemap['tabid'];
$this->name = $valuemap['fieldname'];
Function validate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
validate: function () {
var response = this._super();
if (response !== true) {
return response;
}
Function uploadSuccess
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
uploadSuccess(e, data) {
this.progressInstance.progressIndicator({ mode: 'hide' });
const { result } = data;
const attach = result.result.attach;
attach.forEach((fileAttach) => {
Method testIfAllOperatorsExist
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testIfAllOperatorsExist()
{
foreach ((new \DirectoryIterator(ROOT_DIRECTORY . '/modules/Vtiger/uitypes/')) as $item) {
if ($item->isFile() && 'php' === $item->getExtension()) {
$fileName = $item->getBasename('.php');
Method testDate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testDate()
{
$this->assertSame('+ ' . \date('Y-m-d') . ' +', self::$parserClean
->setContent('+ $(date : now)$ +')
->parse()
Method getCRMRecordMetadata
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getCRMRecordMetadata($mixedid)
{
$multimode = \is_array($mixedid);
$ids = $multimode ? $mixedid : [$mixedid];
Method appendInteger
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function appendInteger(&$combinations)
{
$dbFormat = '123456789';
$fieldData = (new \App\Db\Query())->from('vtiger_field')->where(['uitype' => 7])->one();
foreach ($this->getCombinations() as $combination) {
Method getLabelQuery
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getLabelQuery(): Db\Query
{
$query = (new \App\Db\Query())->select(['cl.crmid', 'cl.label', 'vtiger_crmentity.setype'])
->from('u_#__crmentity_label cl')->innerJoin('vtiger_crmentity', 'cl.crmid = vtiger_crmentity.crmid');
$where = ['and'];
Method process
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(): void
{
$this->status = 1;
$errorsSecurity = \App\Utils\ConfReport::getErrors('security', true);
unset($errorsSecurity['HTTPS']);
Method deactivate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function deactivate(string $moduleName, string $fieldName): bool
{
$moduleModel = \Vtiger_Module_Model::getInstance($moduleName);
if (!($fieldModel = $moduleModel->getFieldByName($fieldName))) {
return false;
Method preProcess
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function preProcess(\App\Request $request, $display = true)
{
parent::preProcess($request, false);
$view = $this->getViewer($request);
if (\App\Config::performance('BROWSING_HISTORY_WORKING')) {
Method parseInventoryData
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function parseInventoryData(\Vtiger_Record_Model $recordModel, array $item, Maps\Inventory $mapModel): array
{
$mapModel->setDataInv($item);
$inventoryModel = \Vtiger_Inventory_Model::getInstance($recordModel->getModuleName());
$inventoryRow = $inventoryModel->loadRowData($item['crmProductId'], ['currency' => $mapModel->dataCrm['currency_id']]);
Method sanitizeDbFormat
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function sanitizeDbFormat(string $date, string $fromFormat)
{
$dbDate = '';
if ($date) {
[$y, $m, $d] = self::explode($date, $fromFormat);
Method addMail
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function addMail(array $params): bool
{
$params['status'] = Config::component('Mail', 'MAILER_REQUIRED_ACCEPTATION_BEFORE_SENDING') ? 0 : 1;
$params['date'] = date('Y-m-d H:i:s');
if (empty($params['owner'])) {
Method change
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function change(App\Request $request)
{
$moduleName = $request->getModule();
$viewer = $this->getViewer($request);
$viewer->assign('WARNING', '');
Method getAddFieldTypeInfo
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAddFieldTypeInfo()
{
$fieldTypesInfo = [];
$addFieldSupportedTypes = $this->getAddSupportedFieldTypes();
$lengthSupportedFieldTypes = ['Text', 'Decimal', 'Integer', 'Currency', 'Editor', 'AdvPercentage'];
Method getConfig
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getConfig($type = false)
{
\App\Log::trace('Start ' . __METHOD__ . " | Type: $type");
$cache = Vtiger_Cache::get('SalesProcesses', false === $type ? 'all' : $type);
if ($cache) {