zammad/zammad

View on GitHub

Showing 2,358 of 4,422 total issues

Similar blocks of code found in 4 locations. Consider refactoring.
Open

$.noty.layouts.bottomLeft = {
    name     : 'bottomLeft',
    options  : { // overrides options

    },
Severity: Major
Found in app/assets/javascripts/app/lib/base/jquery.noty.js and 3 other locations - About 1 day to fix
app/assets/javascripts/app/lib/base/jquery.noty.js on lines 666..704
app/assets/javascripts/app/lib/base/jquery.noty.js on lines 970..1008
app/assets/javascripts/app/lib/base/jquery.noty.js on lines 1009..1047

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 199.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

$.noty.layouts.topLeft = {
    name     : 'topLeft',
    options  : { // overrides options

    },
Severity: Major
Found in app/assets/javascripts/app/lib/base/jquery.noty.js and 3 other locations - About 1 day to fix
app/assets/javascripts/app/lib/base/jquery.noty.js on lines 627..665
app/assets/javascripts/app/lib/base/jquery.noty.js on lines 666..704
app/assets/javascripts/app/lib/base/jquery.noty.js on lines 1009..1047

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 199.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

$.noty.layouts.topRight = {
    name     : 'topRight',
    options  : { // overrides options

    },
Severity: Major
Found in app/assets/javascripts/app/lib/base/jquery.noty.js and 3 other locations - About 1 day to fix
app/assets/javascripts/app/lib/base/jquery.noty.js on lines 627..665
app/assets/javascripts/app/lib/base/jquery.noty.js on lines 666..704
app/assets/javascripts/app/lib/base/jquery.noty.js on lines 970..1008

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 199.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

$.noty.layouts.bottomRight = {
    name     : 'bottomRight',
    options  : { // overrides options

    },
Severity: Major
Found in app/assets/javascripts/app/lib/base/jquery.noty.js and 3 other locations - About 1 day to fix
app/assets/javascripts/app/lib/base/jquery.noty.js on lines 627..665
app/assets/javascripts/app/lib/base/jquery.noty.js on lines 970..1008
app/assets/javascripts/app/lib/base/jquery.noty.js on lines 1009..1047

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 199.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        matrix: {
          create: {
            criteria: {
              ownedByMe: true,
              ownedByNobody: true,
app/frontend/apps/desktop/pages/personal-setting/__tests__/personal-setting-notification-a11y.spec.ts on lines 22..59

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 198.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

          matrix: {
            create: {
              criteria: {
                owned_by_me: true,
                owned_by_nobody: true,
app/frontend/apps/desktop/pages/personal-setting/__tests__/personal-setting-notifications.spec.ts on lines 27..64

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 198.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        QrCode.ECC_CODEWORDS_PER_BLOCK = [
            // Version: (note that index 0 is for padding, and is set to an illegal value)
            //0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40    Error correction level
            [-1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30, 30, 26, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],
            [-1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
Severity: Major
Found in app/assets/javascripts/app/lib/base/qrcodegen.js and 1 other location - About 1 day to fix
app/assets/javascripts/app/lib/base/qrcodegen.js on lines 615..622

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 195.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        QrCode.NUM_ERROR_CORRECTION_BLOCKS = [
            // Version: (note that index 0 is for padding, and is set to an illegal value)
            //0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40    Error correction level
            [-1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25],
            [-1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49],
Severity: Major
Found in app/assets/javascripts/app/lib/base/qrcodegen.js and 1 other location - About 1 day to fix
app/assets/javascripts/app/lib/base/qrcodegen.js on lines 607..614

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 195.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

export type TicketUpdatesSubscription = { __typename?: 'Subscriptions', ticketUpdates: { __typename?: 'TicketUpdatesPayload', ticket?: { __typename?: 'Ticket', id: string, internalId: number, number: string, title: string, createdAt: string, escalationAt?: string | null, updatedAt: string, pendingTime?: string | null, tags?: Array<string> | null, timeUnit?: number | null, subscribed?: boolean | null, preferences?: any | null, stateColorCode: EnumTicketStateColorCode, firstResponseEscalationAt?: string | null, closeEscalationAt?: string | null, updateEscalationAt?: string | null, initialChannel?: EnumChannelArea | null, mentions?: { __typename?: 'MentionConnection', totalCount: number, edges: Array<{ __typename?: 'MentionEdge', cursor: string, node: { __typename?: 'Mention', user: { __typename?: 'User', id: string, internalId: number, firstname?: string | null, lastname?: string | null, fullname?: string | null, vip?: boolean | null, outOfOffice?: boolean | null, outOfOfficeStartAt?: string | null, outOfOfficeEndAt?: string | null, active?: boolean | null, image?: string | null } } }> } | null, owner: { __typename?: 'User', id: string, internalId: number, firstname?: string | null, lastname?: string | null }, customer: { __typename?: 'User', id: string, internalId: number, firstname?: string | null, lastname?: string | null, fullname?: string | null, phone?: string | null, mobile?: string | null, image?: string | null, vip?: boolean | null, active?: boolean | null, outOfOffice?: boolean | null, outOfOfficeStartAt?: string | null, outOfOfficeEndAt?: string | null, email?: string | null, hasSecondaryOrganizations?: boolean | null, organization?: { __typename?: 'Organization', id: string, internalId: number, name?: string | null, active?: boolean | null, objectAttributeValues?: Array<{ __typename?: 'ObjectAttributeValue', value?: any | null, renderedLink?: string | null, attribute: { __typename?: 'ObjectManagerFrontendAttribute', name: string, display: string } }> | null } | null, policy: { __typename?: 'PolicyDefault', update: boolean } }, organization?: { __typename?: 'Organization', id: string, internalId: number, name?: string | null, vip?: boolean | null, active?: boolean | null } | null, state: { __typename?: 'TicketState', id: string, name: string, stateType: { __typename?: 'TicketStateType', name: string } }, group: { __typename?: 'Group', id: string, name?: string | null, emailAddress?: { __typename?: 'EmailAddressParsed', name?: string | null, emailAddress?: string | null } | null }, priority: { __typename?: 'TicketPriority', id: string, name: string, defaultCreate: boolean, uiColor?: string | null }, objectAttributeValues?: Array<{ __typename?: 'ObjectAttributeValue', value?: any | null, renderedLink?: string | null, attribute: { __typename?: 'ObjectManagerFrontendAttribute', name: string, display: string } }> | null, policy: { __typename?: 'PolicyTicket', update: boolean, agentReadAccess: boolean }, timeUnitsPerType?: Array<{ __typename?: 'TicketTimeAccountingTypeSum', name: string, timeUnit: number }> | null } | null } };
Severity: Major
Found in app/frontend/shared/graphql/types.ts and 1 other location - About 1 day to fix
app/frontend/shared/graphql/types.ts on lines 4437..4437

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 195.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

export type TicketQuery = { __typename?: 'Queries', ticket: { __typename?: 'Ticket', id: string, internalId: number, number: string, title: string, createdAt: string, escalationAt?: string | null, updatedAt: string, pendingTime?: string | null, tags?: Array<string> | null, timeUnit?: number | null, subscribed?: boolean | null, preferences?: any | null, stateColorCode: EnumTicketStateColorCode, firstResponseEscalationAt?: string | null, closeEscalationAt?: string | null, updateEscalationAt?: string | null, initialChannel?: EnumChannelArea | null, createArticleType?: { __typename?: 'TicketArticleType', id: string, name?: string | null } | null, mentions?: { __typename?: 'MentionConnection', totalCount: number, edges: Array<{ __typename?: 'MentionEdge', cursor: string, node: { __typename?: 'Mention', user: { __typename?: 'User', id: string, internalId: number, firstname?: string | null, lastname?: string | null, fullname?: string | null, vip?: boolean | null, outOfOffice?: boolean | null, outOfOfficeStartAt?: string | null, outOfOfficeEndAt?: string | null, active?: boolean | null, image?: string | null } } }> } | null, owner: { __typename?: 'User', id: string, internalId: number, firstname?: string | null, lastname?: string | null }, customer: { __typename?: 'User', id: string, internalId: number, firstname?: string | null, lastname?: string | null, fullname?: string | null, phone?: string | null, mobile?: string | null, image?: string | null, vip?: boolean | null, active?: boolean | null, outOfOffice?: boolean | null, outOfOfficeStartAt?: string | null, outOfOfficeEndAt?: string | null, email?: string | null, hasSecondaryOrganizations?: boolean | null, organization?: { __typename?: 'Organization', id: string, internalId: number, name?: string | null, active?: boolean | null, objectAttributeValues?: Array<{ __typename?: 'ObjectAttributeValue', value?: any | null, renderedLink?: string | null, attribute: { __typename?: 'ObjectManagerFrontendAttribute', name: string, display: string } }> | null } | null, policy: { __typename?: 'PolicyDefault', update: boolean } }, organization?: { __typename?: 'Organization', id: string, internalId: number, name?: string | null, vip?: boolean | null, active?: boolean | null } | null, state: { __typename?: 'TicketState', id: string, name: string, stateType: { __typename?: 'TicketStateType', name: string } }, group: { __typename?: 'Group', id: string, name?: string | null, emailAddress?: { __typename?: 'EmailAddressParsed', name?: string | null, emailAddress?: string | null } | null }, priority: { __typename?: 'TicketPriority', id: string, name: string, defaultCreate: boolean, uiColor?: string | null }, objectAttributeValues?: Array<{ __typename?: 'ObjectAttributeValue', value?: any | null, renderedLink?: string | null, attribute: { __typename?: 'ObjectManagerFrontendAttribute', name: string, display: string } }> | null, policy: { __typename?: 'PolicyTicket', update: boolean, agentReadAccess: boolean }, timeUnitsPerType?: Array<{ __typename?: 'TicketTimeAccountingTypeSum', name: string, timeUnit: number }> | null } };
Severity: Major
Found in app/frontend/shared/graphql/types.ts and 1 other location - About 1 day to fix
app/frontend/shared/graphql/types.ts on lines 4487..4487

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 195.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

const handleRoutes = (routes: Array<RouteRecordRaw>, isMainRoute = false) => {
  if (isMainRoute) {
    mainRoutes.push(...routes)
  } else {
    childRoutes.push(...routes)
Severity: Major
Found in app/frontend/apps/mobile/router/index.ts and 1 other location - About 7 hrs to fix
app/frontend/apps/desktop/router/index.ts on lines 21..42

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 190.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

const handleRoutes = (routes: Array<RouteRecordRaw>, isMainRoute = false) => {
  if (isMainRoute) {
    mainRoutes.push(...routes)
  } else {
    childRoutes.push(...routes)
Severity: Major
Found in app/frontend/apps/desktop/router/index.ts and 1 other location - About 7 hrs to fix
app/frontend/apps/mobile/router/index.ts on lines 21..42

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 190.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

export function useTicketQuery(variables: Types.TicketQueryVariables | VueCompositionApi.Ref<Types.TicketQueryVariables> | ReactiveFunction<Types.TicketQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.TicketQuery, Types.TicketQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.TicketQuery, Types.TicketQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.TicketQuery, Types.TicketQueryVariables>> = {}) {
  return VueApolloComposable.useQuery<Types.TicketQuery, Types.TicketQueryVariables>(TicketDocument, variables, options);
}
app/frontend/apps/desktop/entities/email-addresses/graphql/queries/emailAddresses.api.ts on lines 17..19
app/frontend/apps/desktop/entities/email-addresses/graphql/queries/emailAddresses.api.ts on lines 20..22
app/frontend/apps/mobile/entities/organization/graphql/queries/organization.api.ts on lines 24..26
app/frontend/apps/mobile/entities/organization/graphql/queries/organization.api.ts on lines 27..29
app/frontend/apps/mobile/entities/user/graphql/queries/user.api.ts on lines 19..21
app/frontend/apps/mobile/entities/user/graphql/queries/user.api.ts on lines 22..24
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket.api.ts on lines 36..38
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket/articles.api.ts on lines 42..44
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket/articles.api.ts on lines 45..47
app/frontend/shared/graphql/queries/locales.api.ts on lines 19..21
app/frontend/shared/graphql/queries/locales.api.ts on lines 22..24

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 188.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

export function useLocalesLazyQuery(variables: Types.LocalesQueryVariables | VueCompositionApi.Ref<Types.LocalesQueryVariables> | ReactiveFunction<Types.LocalesQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.LocalesQuery, Types.LocalesQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.LocalesQuery, Types.LocalesQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.LocalesQuery, Types.LocalesQueryVariables>> = {}) {
  return VueApolloComposable.useLazyQuery<Types.LocalesQuery, Types.LocalesQueryVariables>(LocalesDocument, variables, options);
}
Severity: Major
Found in app/frontend/shared/graphql/queries/locales.api.ts and 11 other locations - About 7 hrs to fix
app/frontend/apps/desktop/entities/email-addresses/graphql/queries/emailAddresses.api.ts on lines 17..19
app/frontend/apps/desktop/entities/email-addresses/graphql/queries/emailAddresses.api.ts on lines 20..22
app/frontend/apps/mobile/entities/organization/graphql/queries/organization.api.ts on lines 24..26
app/frontend/apps/mobile/entities/organization/graphql/queries/organization.api.ts on lines 27..29
app/frontend/apps/mobile/entities/user/graphql/queries/user.api.ts on lines 19..21
app/frontend/apps/mobile/entities/user/graphql/queries/user.api.ts on lines 22..24
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket.api.ts on lines 33..35
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket.api.ts on lines 36..38
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket/articles.api.ts on lines 42..44
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket/articles.api.ts on lines 45..47
app/frontend/shared/graphql/queries/locales.api.ts on lines 19..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 188.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

export function useUserLazyQuery(variables: Types.UserQueryVariables | VueCompositionApi.Ref<Types.UserQueryVariables> | ReactiveFunction<Types.UserQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.UserQuery, Types.UserQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.UserQuery, Types.UserQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.UserQuery, Types.UserQueryVariables>> = {}) {
  return VueApolloComposable.useLazyQuery<Types.UserQuery, Types.UserQueryVariables>(UserDocument, variables, options);
}
app/frontend/apps/desktop/entities/email-addresses/graphql/queries/emailAddresses.api.ts on lines 17..19
app/frontend/apps/desktop/entities/email-addresses/graphql/queries/emailAddresses.api.ts on lines 20..22
app/frontend/apps/mobile/entities/organization/graphql/queries/organization.api.ts on lines 24..26
app/frontend/apps/mobile/entities/organization/graphql/queries/organization.api.ts on lines 27..29
app/frontend/apps/mobile/entities/user/graphql/queries/user.api.ts on lines 19..21
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket.api.ts on lines 33..35
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket.api.ts on lines 36..38
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket/articles.api.ts on lines 42..44
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket/articles.api.ts on lines 45..47
app/frontend/shared/graphql/queries/locales.api.ts on lines 19..21
app/frontend/shared/graphql/queries/locales.api.ts on lines 22..24

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 188.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

export function useEmailAddressesQuery(variables: Types.EmailAddressesQueryVariables | VueCompositionApi.Ref<Types.EmailAddressesQueryVariables> | ReactiveFunction<Types.EmailAddressesQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.EmailAddressesQuery, Types.EmailAddressesQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.EmailAddressesQuery, Types.EmailAddressesQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.EmailAddressesQuery, Types.EmailAddressesQueryVariables>> = {}) {
  return VueApolloComposable.useQuery<Types.EmailAddressesQuery, Types.EmailAddressesQueryVariables>(EmailAddressesDocument, variables, options);
}
app/frontend/apps/desktop/entities/email-addresses/graphql/queries/emailAddresses.api.ts on lines 20..22
app/frontend/apps/mobile/entities/organization/graphql/queries/organization.api.ts on lines 24..26
app/frontend/apps/mobile/entities/organization/graphql/queries/organization.api.ts on lines 27..29
app/frontend/apps/mobile/entities/user/graphql/queries/user.api.ts on lines 19..21
app/frontend/apps/mobile/entities/user/graphql/queries/user.api.ts on lines 22..24
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket.api.ts on lines 33..35
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket.api.ts on lines 36..38
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket/articles.api.ts on lines 42..44
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket/articles.api.ts on lines 45..47
app/frontend/shared/graphql/queries/locales.api.ts on lines 19..21
app/frontend/shared/graphql/queries/locales.api.ts on lines 22..24

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 188.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

export function useOrganizationLazyQuery(variables: Types.OrganizationQueryVariables | VueCompositionApi.Ref<Types.OrganizationQueryVariables> | ReactiveFunction<Types.OrganizationQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.OrganizationQuery, Types.OrganizationQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.OrganizationQuery, Types.OrganizationQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.OrganizationQuery, Types.OrganizationQueryVariables>> = {}) {
  return VueApolloComposable.useLazyQuery<Types.OrganizationQuery, Types.OrganizationQueryVariables>(OrganizationDocument, variables, options);
}
app/frontend/apps/desktop/entities/email-addresses/graphql/queries/emailAddresses.api.ts on lines 17..19
app/frontend/apps/desktop/entities/email-addresses/graphql/queries/emailAddresses.api.ts on lines 20..22
app/frontend/apps/mobile/entities/organization/graphql/queries/organization.api.ts on lines 24..26
app/frontend/apps/mobile/entities/user/graphql/queries/user.api.ts on lines 19..21
app/frontend/apps/mobile/entities/user/graphql/queries/user.api.ts on lines 22..24
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket.api.ts on lines 33..35
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket.api.ts on lines 36..38
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket/articles.api.ts on lines 42..44
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket/articles.api.ts on lines 45..47
app/frontend/shared/graphql/queries/locales.api.ts on lines 19..21
app/frontend/shared/graphql/queries/locales.api.ts on lines 22..24

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 188.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

export function useLocalesQuery(variables: Types.LocalesQueryVariables | VueCompositionApi.Ref<Types.LocalesQueryVariables> | ReactiveFunction<Types.LocalesQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.LocalesQuery, Types.LocalesQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.LocalesQuery, Types.LocalesQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.LocalesQuery, Types.LocalesQueryVariables>> = {}) {
  return VueApolloComposable.useQuery<Types.LocalesQuery, Types.LocalesQueryVariables>(LocalesDocument, variables, options);
}
Severity: Major
Found in app/frontend/shared/graphql/queries/locales.api.ts and 11 other locations - About 7 hrs to fix
app/frontend/apps/desktop/entities/email-addresses/graphql/queries/emailAddresses.api.ts on lines 17..19
app/frontend/apps/desktop/entities/email-addresses/graphql/queries/emailAddresses.api.ts on lines 20..22
app/frontend/apps/mobile/entities/organization/graphql/queries/organization.api.ts on lines 24..26
app/frontend/apps/mobile/entities/organization/graphql/queries/organization.api.ts on lines 27..29
app/frontend/apps/mobile/entities/user/graphql/queries/user.api.ts on lines 19..21
app/frontend/apps/mobile/entities/user/graphql/queries/user.api.ts on lines 22..24
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket.api.ts on lines 33..35
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket.api.ts on lines 36..38
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket/articles.api.ts on lines 42..44
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket/articles.api.ts on lines 45..47
app/frontend/shared/graphql/queries/locales.api.ts on lines 22..24

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 188.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

export function useUserQuery(variables: Types.UserQueryVariables | VueCompositionApi.Ref<Types.UserQueryVariables> | ReactiveFunction<Types.UserQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.UserQuery, Types.UserQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.UserQuery, Types.UserQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.UserQuery, Types.UserQueryVariables>> = {}) {
  return VueApolloComposable.useQuery<Types.UserQuery, Types.UserQueryVariables>(UserDocument, variables, options);
}
app/frontend/apps/desktop/entities/email-addresses/graphql/queries/emailAddresses.api.ts on lines 17..19
app/frontend/apps/desktop/entities/email-addresses/graphql/queries/emailAddresses.api.ts on lines 20..22
app/frontend/apps/mobile/entities/organization/graphql/queries/organization.api.ts on lines 24..26
app/frontend/apps/mobile/entities/organization/graphql/queries/organization.api.ts on lines 27..29
app/frontend/apps/mobile/entities/user/graphql/queries/user.api.ts on lines 22..24
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket.api.ts on lines 33..35
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket.api.ts on lines 36..38
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket/articles.api.ts on lines 42..44
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket/articles.api.ts on lines 45..47
app/frontend/shared/graphql/queries/locales.api.ts on lines 19..21
app/frontend/shared/graphql/queries/locales.api.ts on lines 22..24

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 188.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

export function useEmailAddressesLazyQuery(variables: Types.EmailAddressesQueryVariables | VueCompositionApi.Ref<Types.EmailAddressesQueryVariables> | ReactiveFunction<Types.EmailAddressesQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.EmailAddressesQuery, Types.EmailAddressesQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.EmailAddressesQuery, Types.EmailAddressesQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.EmailAddressesQuery, Types.EmailAddressesQueryVariables>> = {}) {
  return VueApolloComposable.useLazyQuery<Types.EmailAddressesQuery, Types.EmailAddressesQueryVariables>(EmailAddressesDocument, variables, options);
}
app/frontend/apps/desktop/entities/email-addresses/graphql/queries/emailAddresses.api.ts on lines 17..19
app/frontend/apps/mobile/entities/organization/graphql/queries/organization.api.ts on lines 24..26
app/frontend/apps/mobile/entities/organization/graphql/queries/organization.api.ts on lines 27..29
app/frontend/apps/mobile/entities/user/graphql/queries/user.api.ts on lines 19..21
app/frontend/apps/mobile/entities/user/graphql/queries/user.api.ts on lines 22..24
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket.api.ts on lines 33..35
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket.api.ts on lines 36..38
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket/articles.api.ts on lines 42..44
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticket/articles.api.ts on lines 45..47
app/frontend/shared/graphql/queries/locales.api.ts on lines 19..21
app/frontend/shared/graphql/queries/locales.api.ts on lines 22..24

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 188.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language