Showing 4,652 of 306,333 total issues
Function select
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
select: function (_event, ui) {
$.each(ui.item.address, function (index, value) {
let field = container.find('.fieldValue [name^=' + index + ']');
if (field.length && value) {
if (typeof value !== 'object') {
Function getBasicOptions
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getBasicOptions: function getBasicOptions() {
return {
legend: {
display: true
},
Function registerListViewCheckRecords
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerListViewCheckRecords(container) {
let templateElements = container.find('[name="pdf_template[]"]');
templateElements.on('change', function () {
document.progressLoader = $.progressIndicator({
message: app.vtranslate('JS_PDF_RECALCULATING'),
Function register
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
register(container) {
if (typeof container === 'undefined' || typeof container.length === 'undefined' || !container.length) {
return app.errorLog('Dependend select field container is missing.');
}
container.each(function () {
Function validate
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
validate(element) {
let status = true,
params;
const form = element.closest('form');
if (
Function formatToDisplay
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
formatToDisplay(value, fixed = true, numberOfDecimal = CONFIG.noOfCurrencyDecimals) {
if (!value) {
value = 0;
}
let strDecimal = value.toString().split('.')[1];
Function registerIconsEvents
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerIconsEvents(selectElement) {
selectElement.on('select2:selecting', (event) => {
let currentTarget = $(event.params.args.originalEvent.target);
if (!currentTarget.hasClass('js-select-option-event') && !currentTarget.is('path')) {
return;
Function callbackShown
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
callbackShown: () => {
let href;
if (!selectElement.attr('href')) {
href = selectElement.find('a').attr('href');
}
Method dataProviderByType
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function dataProviderByType()
{
// $type, $assertion, $expected, $text, $message, $exception
return [
['Standard', 'Same', 'Test-text-string-for-purifier', 'Test-text-string-for-purifier', 'Sample text should be unchanged', null],
Method getTemplatePath
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getTemplatePath($templateName, $moduleName = ''): string
{
$moduleName = str_replace(':', '/', $moduleName);
$cacheKey = $templateName . $moduleName;
if (\App\Cache::has('ViewerTemplatePath', $cacheKey)) {
Method purify
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function purify($input, $loop = true)
{
if (empty($input)) {
return $input;
}
Method parseAdvFilter
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function parseAdvFilter($advFilterList = false)
{
if (!$advFilterList) {
$advFilterList = $this->advFilterList;
}
Method validSearchParams
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function validSearchParams(string $moduleName, array $searchParams, $convert = true): array
{
$searchParamsCount = \count($searchParams);
if ($searchParamsCount > 2) {
throw new Exceptions\IllegalValue("ERR_NUMBER_OF_ARGUMENTS_NOT_ALLOWED||{$searchParamsCount}|| > 2||" . Utils::varExport($searchParams, true), 406);
Method findByDomainField
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function findByDomainField(string $moduleName, array $fields, array $emails): array
{
$return = $activeFields = $domainsAndEmails = [];
foreach ($emails as $email) {
$domainsAndEmails[mb_strtolower(explode('@', $email)[1])][] = $email;
Method getDbInfo
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getDbInfo(): array
{
$return = [
'isFileSize' => false,
'size' => 0,
Method getRulesForServiceContracts
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getRulesForServiceContracts(int $serviceContractId, \Vtiger_Record_Model $recordModel): array
{
$times = $businessHours = [];
foreach (self::getSlaPolicyForServiceContracts($serviceContractId, $recordModel->getModule()->getId()) as $row) {
switch ($row['policy_type']) {
Method htmlTruncate
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function htmlTruncate(string $html, int $length = 255, string $ending = '...'): string
{
if (\strlen($html) <= $length) {
return $html;
}
Method formatToRangeText
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function formatToRangeText($value, $mode = 'short', $showEmptyValue = true, $unit = 'h')
{
$full = $short = [];
$hours = (int) $value;
if ('y' === $unit) {
Method davSaveAttendee
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function davSaveAttendee(array $record)
{
$owner = \Users_Privileges_Model::getInstanceById($record['assigned_user_id']);
$invities = $this->getInvitations($record['id']);
$attendees = $this->vcomponent->select('ATTENDEE');
Method baseModuleTools
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function baseModuleTools(): int
{
$i = 0;
$allUtility = $missing = $curentProfile2utility = [];
foreach ((new \App\Db\Query())->from('vtiger_profile2utility')->all() as $row) {