Showing 4,652 of 306,333 total issues
Function registerMyLocation
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerMyLocation: function () {
const locationBtn = this.container.find('.js-my-location-btn');
if (!navigator.geolocation) {
locationBtn.addClass('d-none');
return;
Function getParams
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getParams() {
const referenceModule = $('.js-popup-reference-module', this.container).val(),
sourceFieldName = this.select.attr('name').slice(0, -2),
sourceRecordElement = $('input[name="record"]', this.form),
listFilterFieldsJson = this.form.find('input[name="listFilterFields"]').val(),
Function init
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init() {
$('.js-multicurrency-event', this.container)
.off('click')
.on('click', () => {
let modal = $('<form>').append(this.container.find('.js-currencies-container .js-currencies-modal').clone());
Method register
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function register(string $prefix, string $name = '', ?bool $isDefault = false, bool $isActive = true, int $progress = 0)
{
$dbCommand = \App\Db::getInstance()->createCommand();
$prefix = trim($prefix);
if ($langInfo = \App\Language::getLangInfo($prefix)) {
Function showAlert
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showAlert: function (text) {
return this.showNotify({
title: text,
type: 'error',
closer: false,
Function fetchSearchData
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fetchSearchData({ commit }, { value, roomData, showMore }) {
return new Promise((resolve, reject) => {
AppConnector.request(
{
module: 'Chat',
Method dataValidator
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function dataValidator(): array
{
return [
['url', true, 'ssl://imap.gmail.com:993'],
['url', true, 'ssl://imap.gmail.com'],
Method testGenerateToken
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testGenerateToken(): void
{
$moduleName = 'Contacts';
$moduleModel = \Vtiger_Module_Model::getInstance($moduleName);
if (!($field = current($moduleModel->getFieldsByType('token', true)))) {
Method initTables
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function initTables($basetable = false, $basetableid = false)
{
$this->basetable = $basetable;
$this->basetableid = $basetableid;
$db = \App\Db::getInstance();
Method testAddConfiguration
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testAddConfiguration(): void
{
$app = \Settings_WebserviceApps_Record_Model::getCleanInstance();
$app->set('type', 'ManageConsents');
$app->set('status', 1);
Method relatedRecordsListPrinter
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function relatedRecordsListPrinter(\Vtiger_RelationListView_Model $relationListView, \Vtiger_Paging_Model $pagingModel, int $maxLength): string
{
$relatedModuleName = $relationListView->getRelationModel()->getRelationModuleName();
$rows = $headers = '';
$fields = $relationListView->getRelationModel()->getQueryFields();
Method getRecordVariable
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRecordVariable($fieldType = false)
{
$cacheKey = "{$this->moduleName}|$fieldType";
if (isset(static::$recordVariable[$cacheKey])) {
return static::$recordVariable[$cacheKey];
Method send
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function send(string $url, string $method, array $option = []): bool
{
$this->error = null;
$this->success = false;
$this->basicValidations($url);
Method getLabel
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getLabel($mixedId, bool $raw = false)
{
$multiMode = \is_array($mixedId);
$ids = array_filter($multiMode ? array_unique($mixedId) : [$mixedId]);
$result = $missing = [];
Method displayElapseTime
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function displayElapseTime($interval, string $formatIn = 'i', string $formatOut = 'ahi', bool $short = true): string
{
$dateFormat = [];
$multiplier = 1;
switch ($formatIn) {
Method getEditFields
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getEditFields(): array
{
$fields = [];
$editFields = ['name'];
$editFields[] = 'icon';
Method import
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function import(): bool
{
$allChecked = false;
try {
if ($categories = $this->getCategoriesFromApi()) {
Method createStatus
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createStatus()
{
$status = $this->record->get('activitystatus');
if ('VEVENT' === (string) $this->vcomponent->name) {
$values = [
Method process
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(): int
{
$dataReader = (new \App\Db\Query())->select(['dbo.RACHUNEK_FIRMY.*', 'dbo.BANKI.SWIFT', 'bankName' => 'dbo.BANKI.NAZWA'])
->from('dbo.RACHUNEK_FIRMY')
->leftJoin('dbo.BANKI', 'dbo.RACHUNEK_FIRMY.ID_BANKU = dbo.BANKI.ID_BANKU')
Method getPrivilegesFile
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getPrivilegesFile($userId): array
{
if (isset(static::$userPrivilegesCache[$userId])) {
return self::$userPrivilegesCache[$userId];
}