Showing 4,240 of 4,240 total issues
Method search_index_reload
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def search_index_reload(silent: false, worker: 0)
tolerance = 10
tolerance_count = 0
query = reorder(created_at: :desc)
total = query.count
Method assets
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def assets(data)
app_model_chat_session = Chat::Session.to_app_model
if !data[ app_model_chat_session ]
Method custom_payload
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def custom_payload
{
'@type': 'MessageCard',
'@context': 'http://schema.org/extensions',
themeColor: '#{ticket.current_state_color}',
Method last_contact_update_at
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def last_contact_update_at
# if article in internal
return false if internal
Method list
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.list(data)
linkobject = link_object_get(name: data[:link_object])
return if !linkobject
items = []
Method _write_file
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self._write_file(file, permission, data)
location = "#{@@root}/#{file}"
# rename existing file if not already the same file
if File.exist?(location)
Method with_permissions
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.with_permissions(keys)
if keys.class != Array
keys = [keys]
end
permission_ids = []
Method model_index_render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def model_index_render(object, params)
paginate_with(default: 500)
sql_helper = ::SqlHelper.new(object: object)
sort_by = sql_helper.get_sort_by(params, 'id')
Method password_reset_verify
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def password_reset_verify
raise Exceptions::UnprocessableEntity, 'token param needed!' if params[:token].blank?
# If no password is given, verify token only.
if params[:password].blank?
Method search_generic
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def search_generic
# get params
query = params[:query]
if query.respond_to?(:permit!)
query = query.permit!.to_h
Method index
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def index
system_online_service = Setting.get('system_online_service')
assets = {}
external_credential_ids = []
Method index
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def index
system_online_service = Setting.get('system_online_service')
assets = {}
external_credential_ids = []
Method sequence
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.sequence
[
'Import::Ldap::User::NormalizeEntry',
'Import::Ldap::User::RemoteId::FromEntry',
'Import::Ldap::User::RemoteId::Unhex',
Method initialize
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(title:, header:, records:, locale:, timezone: nil)
require 'write_xlsx' # Only load this gem when it is really used.
@title = title
Method all
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.all
@all ||= begin
all = {}
dir = Rails.root.join('app/models').to_s
tables = ActiveRecord::Base.connection.tables
Method provider_inbound_mx
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.provider_inbound_mx(user, email, password, mx_domains)
inbounds = []
mx_domains.each do |domain|
inbound = [
{
Method run
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def run
return super if super
return if !check_chat_exists
return if blocked_ip?
return if blocked_country?
Function useObjectAttributeLoadFormFields
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const useObjectAttributeLoadFormFields = (
objectAttributeObjects: EnumObjectManagerObjects[],
) => {
const objectAttributesByObject: Partial<
Record<EnumObjectManagerObjects, ReturnType<typeof useObjectAttributes>>
Function fieldTypeAttributes
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public fieldTypeAttributes() {
const attributes: Partial<FormSchemaField> = {}
const props: FormFieldAdditionalProps = {
noOptionsLabelTranslation: !this.attributeConfig.translate,
clearable: this.attributeConfig.nulloption || false,
Function openOverlayContainer
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const openOverlayContainer = async (
type: OverlayContainerType,
name: string,
props: Record<string, unknown>,
) => {