zammad/zammad

View on GitHub
app/frontend/shared/entities/object-attributes/graphql/queries/objectManagerFrontendAttributes.api.ts

Summary

Maintainability
D
1 day
Test Coverage

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

export function useObjectManagerFrontendAttributesQuery(variables: Types.ObjectManagerFrontendAttributesQueryVariables | VueCompositionApi.Ref<Types.ObjectManagerFrontendAttributesQueryVariables> | ReactiveFunction<Types.ObjectManagerFrontendAttributesQueryVariables>, options: VueApolloComposable.UseQueryOptions<Types.ObjectManagerFrontendAttributesQuery, Types.ObjectManagerFrontendAttributesQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.ObjectManagerFrontendAttributesQuery, Types.ObjectManagerFrontendAttributesQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.ObjectManagerFrontendAttributesQuery, Types.ObjectManagerFrontendAttributesQueryVariables>> = {}) {
  return VueApolloComposable.useQuery<Types.ObjectManagerFrontendAttributesQuery, Types.ObjectManagerFrontendAttributesQueryVariables>(ObjectManagerFrontendAttributesDocument, variables, options);
}
app/frontend/apps/desktop/entities/user/current/graphql/subscriptions/userCurrentTwoFactorUpdates.api.ts on lines 21..23
app/frontend/apps/desktop/pages/personal-setting/graphql/subscriptions/userCurrentAccessTokenUpdates.api.ts on lines 18..20
app/frontend/apps/desktop/pages/personal-setting/graphql/subscriptions/userCurrentAvatarUpdates.api.ts on lines 23..25
app/frontend/apps/desktop/pages/personal-setting/graphql/subscriptions/userCurrentDevicesUpdates.api.ts on lines 18..20
app/frontend/apps/desktop/pages/personal-setting/graphql/subscriptions/userCurrentOverviewOrderingUpdates.api.ts on lines 18..20
app/frontend/apps/mobile/entities/organization/graphql/subscriptions/organizationUpdates.api.ts on lines 21..23
app/frontend/apps/mobile/entities/ticket/graphql/subscriptions/ticketOverviewUpdates.api.ts on lines 27..29
app/frontend/apps/mobile/pages/search/graphql/queries/searchOverview.api.ts on lines 90..92
app/frontend/apps/mobile/pages/search/graphql/queries/searchOverview.api.ts on lines 93..95
app/frontend/apps/mobile/pages/ticket/graphql/queries/autocompleteSearchMergeTicket.api.ts on lines 31..33
app/frontend/apps/mobile/pages/ticket/graphql/queries/autocompleteSearchMergeTicket.api.ts on lines 34..36
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticketsByOverview.api.ts on lines 72..74
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticketsByOverview.api.ts on lines 75..77
app/frontend/apps/mobile/pages/ticket/graphql/subscriptions/live-user/ticketLiveUserUpdates.api.ts on lines 18..20
app/frontend/apps/mobile/pages/ticket/graphql/subscriptions/ticketArticlesUpdates.api.ts on lines 23..25
app/frontend/apps/mobile/pages/ticket/graphql/subscriptions/ticketUpdates.api.ts on lines 29..31
app/frontend/shared/components/Form/fields/FieldAgent/graphql/queries/autocompleteSearch/agent.api.ts on lines 30..32
app/frontend/shared/components/Form/fields/FieldAgent/graphql/queries/autocompleteSearch/agent.api.ts on lines 33..35
app/frontend/shared/components/Form/fields/FieldCustomer/graphql/queries/autocompleteSearch/user.api.ts on lines 30..32
app/frontend/shared/components/Form/fields/FieldCustomer/graphql/queries/autocompleteSearch/user.api.ts on lines 33..35
app/frontend/shared/components/Form/fields/FieldEditor/graphql/queries/knowledgeBase/answerSuggestions.api.ts on lines 20..22
app/frontend/shared/components/Form/fields/FieldEditor/graphql/queries/knowledgeBase/answerSuggestions.api.ts on lines 23..25
app/frontend/shared/components/Form/fields/FieldEditor/graphql/queries/mention/mentionSuggestions.api.ts on lines 18..20
app/frontend/shared/components/Form/fields/FieldEditor/graphql/queries/mention/mentionSuggestions.api.ts on lines 21..23
app/frontend/shared/components/Form/fields/FieldEditor/graphql/queries/textModule/textModuleSuggestions.api.ts on lines 20..22
app/frontend/shared/components/Form/fields/FieldEditor/graphql/queries/textModule/textModuleSuggestions.api.ts on lines 23..25
app/frontend/shared/components/Form/fields/FieldExternalDataSource/graphql/queries/autocompleteSearchObjectAttributeExternalDataSource.api.ts on lines 19..21
app/frontend/shared/components/Form/fields/FieldExternalDataSource/graphql/queries/autocompleteSearchObjectAttributeExternalDataSource.api.ts on lines 22..24
app/frontend/shared/components/Form/fields/FieldOrganization/graphql/queries/autocompleteSearch/organization.api.ts on lines 25..27
app/frontend/shared/components/Form/fields/FieldOrganization/graphql/queries/autocompleteSearch/organization.api.ts on lines 28..30
app/frontend/shared/components/Form/fields/FieldRecipient/graphql/queries/autocompleteSearch/recipient.api.ts on lines 21..23
app/frontend/shared/components/Form/fields/FieldRecipient/graphql/queries/autocompleteSearch/recipient.api.ts on lines 24..26
app/frontend/shared/components/Form/graphql/queries/formUpdater.api.ts on lines 19..21
app/frontend/shared/components/Form/graphql/queries/formUpdater.api.ts on lines 22..24
app/frontend/shared/entities/object-attributes/graphql/queries/objectManagerFrontendAttributes.api.ts on lines 29..31
app/frontend/shared/entities/online-notification/graphql/subscriptions/onlineNotificationsCount.api.ts on lines 15..17
app/frontend/shared/entities/public-links/graphql/queries/links.api.ts on lines 16..18
app/frontend/shared/entities/public-links/graphql/queries/links.api.ts on lines 19..21
app/frontend/shared/entities/public-links/graphql/subscriptions/currentLinks.api.ts on lines 18..20
app/frontend/shared/entities/tags/graphql/queries/autocompleteTags.api.ts on lines 16..18
app/frontend/shared/entities/tags/graphql/queries/autocompleteTags.api.ts on lines 19..21
app/frontend/shared/entities/ticket/graphql/queries/ticket/overviews.api.ts on lines 25..27
app/frontend/shared/entities/ticket/graphql/queries/ticket/overviews.api.ts on lines 28..30
app/frontend/shared/entities/user/current/graphql/mutations/two-factor/userCurrentTwoFactorGetMethodConfiguration.api.ts on lines 13..15
app/frontend/shared/entities/user/current/graphql/mutations/two-factor/userCurrentTwoFactorGetMethodConfiguration.api.ts on lines 16..18
app/frontend/shared/entities/user/current/graphql/queries/two-factor/userCurrentTwoFactorInitiateMethodConfiguration.api.ts on lines 13..15
app/frontend/shared/entities/user/current/graphql/queries/two-factor/userCurrentTwoFactorInitiateMethodConfiguration.api.ts on lines 16..18
app/frontend/shared/graphql/queries/ticketSignature.api.ts on lines 16..18
app/frontend/shared/graphql/queries/ticketSignature.api.ts on lines 19..21
app/frontend/shared/graphql/queries/translations.api.ts on lines 17..19
app/frontend/shared/graphql/queries/translations.api.ts on lines 20..22
app/frontend/shared/graphql/subscriptions/currentUserUpdates.api.ts on lines 18..20
app/frontend/shared/graphql/subscriptions/userUpdates.api.ts on lines 18..20

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 183.

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 54 locations. Consider refactoring.
Open

export function useObjectManagerFrontendAttributesLazyQuery(variables?: Types.ObjectManagerFrontendAttributesQueryVariables | VueCompositionApi.Ref<Types.ObjectManagerFrontendAttributesQueryVariables> | ReactiveFunction<Types.ObjectManagerFrontendAttributesQueryVariables>, options: VueApolloComposable.UseQueryOptions<Types.ObjectManagerFrontendAttributesQuery, Types.ObjectManagerFrontendAttributesQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.ObjectManagerFrontendAttributesQuery, Types.ObjectManagerFrontendAttributesQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.ObjectManagerFrontendAttributesQuery, Types.ObjectManagerFrontendAttributesQueryVariables>> = {}) {
  return VueApolloComposable.useLazyQuery<Types.ObjectManagerFrontendAttributesQuery, Types.ObjectManagerFrontendAttributesQueryVariables>(ObjectManagerFrontendAttributesDocument, variables, options);
}
app/frontend/apps/desktop/entities/user/current/graphql/subscriptions/userCurrentTwoFactorUpdates.api.ts on lines 21..23
app/frontend/apps/desktop/pages/personal-setting/graphql/subscriptions/userCurrentAccessTokenUpdates.api.ts on lines 18..20
app/frontend/apps/desktop/pages/personal-setting/graphql/subscriptions/userCurrentAvatarUpdates.api.ts on lines 23..25
app/frontend/apps/desktop/pages/personal-setting/graphql/subscriptions/userCurrentDevicesUpdates.api.ts on lines 18..20
app/frontend/apps/desktop/pages/personal-setting/graphql/subscriptions/userCurrentOverviewOrderingUpdates.api.ts on lines 18..20
app/frontend/apps/mobile/entities/organization/graphql/subscriptions/organizationUpdates.api.ts on lines 21..23
app/frontend/apps/mobile/entities/ticket/graphql/subscriptions/ticketOverviewUpdates.api.ts on lines 27..29
app/frontend/apps/mobile/pages/search/graphql/queries/searchOverview.api.ts on lines 90..92
app/frontend/apps/mobile/pages/search/graphql/queries/searchOverview.api.ts on lines 93..95
app/frontend/apps/mobile/pages/ticket/graphql/queries/autocompleteSearchMergeTicket.api.ts on lines 31..33
app/frontend/apps/mobile/pages/ticket/graphql/queries/autocompleteSearchMergeTicket.api.ts on lines 34..36
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticketsByOverview.api.ts on lines 72..74
app/frontend/apps/mobile/pages/ticket/graphql/queries/ticketsByOverview.api.ts on lines 75..77
app/frontend/apps/mobile/pages/ticket/graphql/subscriptions/live-user/ticketLiveUserUpdates.api.ts on lines 18..20
app/frontend/apps/mobile/pages/ticket/graphql/subscriptions/ticketArticlesUpdates.api.ts on lines 23..25
app/frontend/apps/mobile/pages/ticket/graphql/subscriptions/ticketUpdates.api.ts on lines 29..31
app/frontend/shared/components/Form/fields/FieldAgent/graphql/queries/autocompleteSearch/agent.api.ts on lines 30..32
app/frontend/shared/components/Form/fields/FieldAgent/graphql/queries/autocompleteSearch/agent.api.ts on lines 33..35
app/frontend/shared/components/Form/fields/FieldCustomer/graphql/queries/autocompleteSearch/user.api.ts on lines 30..32
app/frontend/shared/components/Form/fields/FieldCustomer/graphql/queries/autocompleteSearch/user.api.ts on lines 33..35
app/frontend/shared/components/Form/fields/FieldEditor/graphql/queries/knowledgeBase/answerSuggestions.api.ts on lines 20..22
app/frontend/shared/components/Form/fields/FieldEditor/graphql/queries/knowledgeBase/answerSuggestions.api.ts on lines 23..25
app/frontend/shared/components/Form/fields/FieldEditor/graphql/queries/mention/mentionSuggestions.api.ts on lines 18..20
app/frontend/shared/components/Form/fields/FieldEditor/graphql/queries/mention/mentionSuggestions.api.ts on lines 21..23
app/frontend/shared/components/Form/fields/FieldEditor/graphql/queries/textModule/textModuleSuggestions.api.ts on lines 20..22
app/frontend/shared/components/Form/fields/FieldEditor/graphql/queries/textModule/textModuleSuggestions.api.ts on lines 23..25
app/frontend/shared/components/Form/fields/FieldExternalDataSource/graphql/queries/autocompleteSearchObjectAttributeExternalDataSource.api.ts on lines 19..21
app/frontend/shared/components/Form/fields/FieldExternalDataSource/graphql/queries/autocompleteSearchObjectAttributeExternalDataSource.api.ts on lines 22..24
app/frontend/shared/components/Form/fields/FieldOrganization/graphql/queries/autocompleteSearch/organization.api.ts on lines 25..27
app/frontend/shared/components/Form/fields/FieldOrganization/graphql/queries/autocompleteSearch/organization.api.ts on lines 28..30
app/frontend/shared/components/Form/fields/FieldRecipient/graphql/queries/autocompleteSearch/recipient.api.ts on lines 21..23
app/frontend/shared/components/Form/fields/FieldRecipient/graphql/queries/autocompleteSearch/recipient.api.ts on lines 24..26
app/frontend/shared/components/Form/graphql/queries/formUpdater.api.ts on lines 19..21
app/frontend/shared/components/Form/graphql/queries/formUpdater.api.ts on lines 22..24
app/frontend/shared/entities/object-attributes/graphql/queries/objectManagerFrontendAttributes.api.ts on lines 26..28
app/frontend/shared/entities/online-notification/graphql/subscriptions/onlineNotificationsCount.api.ts on lines 15..17
app/frontend/shared/entities/public-links/graphql/queries/links.api.ts on lines 16..18
app/frontend/shared/entities/public-links/graphql/queries/links.api.ts on lines 19..21
app/frontend/shared/entities/public-links/graphql/subscriptions/currentLinks.api.ts on lines 18..20
app/frontend/shared/entities/tags/graphql/queries/autocompleteTags.api.ts on lines 16..18
app/frontend/shared/entities/tags/graphql/queries/autocompleteTags.api.ts on lines 19..21
app/frontend/shared/entities/ticket/graphql/queries/ticket/overviews.api.ts on lines 25..27
app/frontend/shared/entities/ticket/graphql/queries/ticket/overviews.api.ts on lines 28..30
app/frontend/shared/entities/user/current/graphql/mutations/two-factor/userCurrentTwoFactorGetMethodConfiguration.api.ts on lines 13..15
app/frontend/shared/entities/user/current/graphql/mutations/two-factor/userCurrentTwoFactorGetMethodConfiguration.api.ts on lines 16..18
app/frontend/shared/entities/user/current/graphql/queries/two-factor/userCurrentTwoFactorInitiateMethodConfiguration.api.ts on lines 13..15
app/frontend/shared/entities/user/current/graphql/queries/two-factor/userCurrentTwoFactorInitiateMethodConfiguration.api.ts on lines 16..18
app/frontend/shared/graphql/queries/ticketSignature.api.ts on lines 16..18
app/frontend/shared/graphql/queries/ticketSignature.api.ts on lines 19..21
app/frontend/shared/graphql/queries/translations.api.ts on lines 17..19
app/frontend/shared/graphql/queries/translations.api.ts on lines 20..22
app/frontend/shared/graphql/subscriptions/currentUserUpdates.api.ts on lines 18..20
app/frontend/shared/graphql/subscriptions/userUpdates.api.ts on lines 18..20

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 183.

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

There are no issues that match your filters.

Category
Status