Showing 4,862 of 4,862 total issues
Function PnServiceCta
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const PnServiceCta = ({ serviceId, activate }: PnServiceCtaProps) => {
const dispatch = useIODispatch();
const servicePreferenceResponseSuccess = useIOSelector(
servicePreferenceResponseSuccessSelector
- 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 ItwLifecycleSection
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const ItwLifecycleSection = () => {
const dispatch = useIODispatch();
const isItwInstalled = useIOSelector(itwLifecycleIsInstalledSelector);
const isItwOperational = useIOSelector(itwLifecycleIsOperationalSelector);
const isItwValid = useIOSelector(itwLifecycleIsValidSelector);
- 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 PreconditionsFooterContent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const PreconditionsFooterContent = ({
onNavigation,
onDismiss
}: PreconditionsFooterProps) => {
const store = useIOStore();
- 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 WalletPaymentHeader
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const WalletPaymentHeader = ({ currentStep }: WalletPaymentHeaderProps) => {
const navigation = useIONavigation();
const dispatch = useIODispatch();
const goBackHandler = useWalletPaymentGoBackHandler();
- 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 SelectedPaymentMethodModuleCheckout
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const SelectedPaymentMethodModuleCheckout = () => {
const dispatch = useIODispatch();
const selectedWalletOption = useIOSelector(
walletPaymentSelectedWalletOptionSelector
- 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 PaymentsMethodDetailsDeleteButton
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const PaymentsMethodDetailsDeleteButton = ({
paymentMethod
}: PaymentsDetailsDeleteMethodButtonProps) => {
const navigation = useIONavigation();
const dispatch = useIODispatch();
- 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 PaymentsBizEventsTransactionInfoSection
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const PaymentsBizEventsTransactionInfoSection = ({
transaction,
loading
}: PaymentsBizEventsTransactionInfoSectionProps) => {
const transactionInfo = transaction?.infoNotice;
- 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 ServiceDetailsScreenComponent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const ServiceDetailsScreenComponent = ({
children,
actionsProps,
debugMode = false,
title = ""
- 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 FeaturedCardCarousel
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const FeaturedCardCarousel: React.FunctionComponent<Props> = (props: Props) => {
const dispatch = useIODispatch();
const navigation = useNavigation<IOStackNavigationProp<AppParamsList>>();
const isCgnEnabled = useIOSelector(isCGNEnabledSelector);
const isCdcEnabled = useIOSelector(isCdcEnabledSelector);
- 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 BaseCoBadgeCard
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const BaseCoBadgeCard: React.FunctionComponent<Props> = (props: Props) => {
const imgDimensions = useImageResize(
BASE_IMG_W,
BASE_IMG_H,
props.abi?.logoUrl
- 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 SearchStartComponent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const SearchStartComponent: React.FunctionComponent<Props> = (
props: Props
) => {
const locales = loadLocales(props.methodType);
- 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 CdcRequestPartiallySuccess
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const CdcRequestPartiallySuccess = () => {
const navigation = useNavigation<IOStackNavigationProp<AppParamsList>>();
const cdcEnrollUserToBonus = useIOSelector(cdcEnrollUserToBonusSelector);
const onExitPress = () => {
- 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 actionTracking
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
(middleware: MiddlewareAPI) =>
(next: Dispatch) =>
(action: Action): Action => {
if (mixpanel !== undefined) {
// Call mixpanel tracking only after we have
- 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 WalletCardsContainer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const WalletCardsContainer = () => {
const isLoading = useIOSelector(selectIsWalletCardsLoading);
const cards = useIOSelector(selectSortedWalletCards);
const selectedCategory = useIOSelector(selectWalletCategoryFilter);
- 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 CgnMerchantsFilters
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const CgnMerchantsFilters: React.FunctionComponent<Props> = (props: Props) => {
const [searchValue, setSearchValue] = useState<string>("");
const [address, setAddress] = useState<string>("");
const [checkedCategories, setCheckedCategories] = useState<
ReadonlyArray<string>
- 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 SearchAvailableUserBPayScreen
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const SearchAvailableUserBPayScreen = (props: Props): React.ReactElement => {
useAvoidHardwareBackButton();
const bPayAccounts = props.bPayAccounts;
const noBPayFound = isReady(bPayAccounts) && bPayAccounts.value.length === 0;
- 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 FimsFlowSuccessBody
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const FimsFlowSuccessBody = ({
consents,
onAbort
}: FimsSuccessBodyProps) => {
const dispatch = useIODispatch();
- 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 CgnMerchantsListScreen
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const CgnMerchantsListScreen: React.FunctionComponent<Props> = (
props: Props
) => {
const [searchValue, setSearchValue] = React.useState("");
const [merchantList, setMerchantsList] = React.useState<
- 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 AddBPayScreen
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const AddBPayScreen = (props: Props): React.ReactElement | null => {
// next could be skip or not (a pan should be added)
const [currentAction, setNextAction] = React.useState<NextAction>({
index: 0,
skip: false
- 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 AddCoBadgeScreen
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const AddCoBadgeScreen = (props: Props): React.ReactElement | null => {
// next could be skip or not (a pan should be added)
const [currentAction, setNextAction] = React.useState<NextAction>({
index: 0,
skip: false
- 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"