Showing 502 of 8,855 total issues
Avoid too many return
statements within this function. Open
return helpHandler(handlerData);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return helpHandler(handlerData);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return searchItemsHandler(handlerData)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return sendMessage(
handlerData,
messages.exampleBotMessage.tnxForTransaction,
'message',
false,
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return (
<PdfMessage
url={preview || pdfImage}
size={size}
onPress={() => onMediaMessagePress(mimetype, image, mediaProps)}
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return (
<ParsedText
style={[
styles[props.position].text,
props.textStyle && props.textStyle[props.position],
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return (
<FileMessage
url={image as string}
size={size as string}
onPress={() => downloadFile(image as string, originalName as string)}
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return (
<FileMessage
url={image}
size={size}
onPress={() => downloadFile(image, originalName)}
- Create a ticketCreate a ticket
Function getRandomNFT
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const getRandomNFT = (itemsList) => {
if (itemsList.success && itemsList.balance.length > 0) {
const filteredItems = itemsList.balance.filter(item => item.tokenType === 'NFT' && item.balance > 0);
if (filteredItems.length <= 0) {
return [];
- Read upRead up
- Create a ticketCreate a ticket
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 messagingTimeout
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const messagingTimeout = (data, timeToAdd) => {
console.log("START TIMEOUT ", timeToAdd)
const timeData = timeToAdd.split(":");
const addedTime = addingTime(data, timeData);
- Read upRead up
- Create a ticketCreate a ticket
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 xmppSender
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const xmppSender = (data, message, type, isSystemMessage, tokenAmount, buttons) => {
sendTyping(data.xmpp, data.connectData, data.roomJID, 'pausedComposing').then(() => {
data.xmpp.send(xml('message', {
to: data.roomJID,
type: data.receiverData ? 'groupchat' : type,
- Read upRead up
- Create a ticketCreate a ticket
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 xmppSender
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const xmppSender = (data, message, type, isSystemMessage, tokenAmount, buttons) => {
sendTyping(data.xmpp, data.connectData, data.roomJID, 'pausedComposing').then(() => {
data.xmpp.send(xml('message', {
to: data.roomJID,
type: data.receiverData ? 'groupchat' : type,
- Read upRead up
- Create a ticketCreate a ticket
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 getWritingTime
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const getWritingTime = (message) => {
if (message.length <= 120) {
return 2000
}
if (message.length <= 250 && message.length > 120) {
- Read upRead up
- Create a ticketCreate a ticket
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 xmppSender
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const xmppSender = (data, message, type, isSystemMessage, tokenAmount, buttons) => {
sendTyping(data.xmpp, data.connectData, data.roomJID, 'pausedComposing').then(() => {
data.xmpp.send(xml('message', {
to: data.roomJID,
type: data.receiverData ? 'groupchat' : type,
- Read upRead up
- Create a ticketCreate a ticket
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 xmppSender
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const xmppSender = (data, message, type, isSystemMessage, tokenAmount, buttons, noName) => {
sendTyping(data.xmpp, data.connectData, data.roomJID, 'pausedComposing').then(() => {
data.xmpp.send(xml('message', {
to: data.roomJID,
type: data.receiverData ? 'groupchat' : type,
- Read upRead up
- Create a ticketCreate a ticket
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"