Showing 4,862 of 4,862 total issues
Function handleFindInstitutions
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* handleFindInstitutions(
findInstitutions: ServicesClient["findInstitutions"],
action: ActionType<typeof paginatedInstitutionsGet.request>
) {
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function cgnGenerateOtp
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* cgnGenerateOtp(
generateOtp: ReturnType<typeof BackendCGN>["generateOtp"],
action: ActionType<(typeof cgnGenerateOtpAction)["request"]>
) {
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function groupTransactionsByMonth
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const groupTransactionsByMonth = (
transactions: ReadonlyArray<NoticeListItem>
): Array<SectionListData<NoticeListItem>> => {
const groups = transactions.reduce((acc, element) => {
if (element.noticeDate !== undefined) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function messageGetStatusReducer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const messageGetStatusReducer = (
state: MessageGetStatus = INITIAL_STATE,
action: Action
): MessageGetStatus => {
switch (action.type) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function trackCdc
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
(mp: NonNullable<typeof mixpanel>) =>
(action: Action): void => {
switch (action.type) {
case getType(cdcRequestBonusList.request):
case getType(cdcRequestBonusList.success):
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function handleGetBizEventsTransactions
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* handleGetBizEventsTransactions(
getTransactionList: TransactionClient["getPaidNotices"],
action: ActionType<(typeof getPaymentsBizEventsTransactionsAction)["request"]>
) {
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function handleGetFeaturedInstitutions
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* handleGetFeaturedInstitutions(
getFeaturedInstitutions: ServicesClient["getFeaturedInstitutions"],
action: ActionType<typeof featuredInstitutionsGet.request>
) {
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function handleGetFeaturedServices
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* handleGetFeaturedServices(
getFeaturedServices: ServicesClient["getFeaturedServices"],
action: ActionType<typeof featuredServicesGet.request>
) {
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function trackBPayAction
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
(mp: NonNullable<typeof mixpanel>) =>
(action: Action): void => {
switch (action.type) {
case getType(walletAddBPayStart):
case getType(walletAddBPayCompleted):
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function handleLoadAbi
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* handleLoadAbi(
getAbi: ReturnType<typeof ContentClient>["getAbiList"]
) {
try {
const getAbiWithRefreshResult: SagaCallReturnType<typeof getAbi> =
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function handleLoadCoBadgeConfiguration
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* handleLoadCoBadgeConfiguration(
getCobadgeServices: ReturnType<typeof ContentClient>["getCobadgeServices"],
_: ActionType<typeof loadCoBadgeAbiConfiguration.request>
) {
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function DocumentWithSignature
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const DocumentWithSignature = (props: Props) => {
const pdfRef = React.useRef<Pdf>(null);
const [totalPages, setTotalPages] = React.useState(0);
const [currentPage, setCurrentPage] = React.useState(1);
const documents = useIOSelector(fciSignatureDetailDocumentsSelector);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function buildAbsoluteUrl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const buildAbsoluteUrl = (
redirect: string | undefined = undefined,
originalRequestUrl: string
) => {
if (!redirect) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function InitiativeRefundSettingsComponent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const InitiativeRefundSettingsComponent = (props: Props) => {
const { initiative } = props;
const navigation = useNavigation<IOStackNavigationProp<AppParamsList>>();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function orderCategoriesByNameKey
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const orderCategoriesByNameKey = (
categories: ReadonlyArray<ProductCategoryWithNewDiscountsCount>
): ReadonlyArray<ProductCategoryWithNewDiscountsCount> =>
[...categories].sort((c1, c2) => {
const c1Specs = getCategorySpecs(c1.productCategory);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function cgnCategoriesSaga
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* cgnCategoriesSaga(
getPublishedCategories: ReturnType<
typeof BackendCgnMerchants
>["getPublishedCategories"],
action: ActionType<(typeof cgnCategories)["request"]>
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function handleCgnStartActivationSaga
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* handleCgnStartActivationSaga(): SagaIterator {
const initialScreen: ReturnType<typeof NavigationService.getCurrentRoute> =
yield* call(NavigationService.getCurrentRoute);
const sagaExecution = () => withResetNavigationStack(cgnActivationWorkUnit);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function MessagePaymentItem
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const MessagePaymentItem = ({
hideExpirationDate = false,
index = 0,
isPNPayment = false,
messageId,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function EmptyList
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const EmptyList = ({ category }: EmptyListProps) => {
const dispatch = useIODispatch();
const store = useIOStore();
const emptyListReason = useIOSelector(state =>
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ItwPresentationClaimsSection
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const ItwPresentationClaimsSection = ({
credential
}: ItwPresentationClaimsSectionProps) => {
const [valuesHidden, setValuesHidden] = React.useState(false);
const credentialStatus = getCredentialStatus(credential);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"