Showing 250 of 735 total issues
Avoid too many return
statements within this function. Open
return (
<WebRtcContext.Provider value={webRtc}>
<Equipment />
</WebRtcContext.Provider>
);
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return t(`${webRtcNamespace}.transport_${health.connection.sendTransport.transportState}.message`, {
transport: 'send-transport',
});
Avoid too many return
statements within this function. Open
if (source === 'loopback-screen' && kind === 'video') return true;
Avoid too many return
statements within this function. Open
return { lastActivity: lastActivity };
Avoid too many return
statements within this function. Open
return { valid: true };
Avoid too many return
statements within this method. Open
return Redirect(model.ReturnUrl);
Avoid too many return
statements within this method. Open
if (year > end) return null;
Avoid too many return
statements within this method. Open
return Redirect("~/");
Avoid too many return
statements within this method. Open
return Redirect(model.ReturnUrl);
Avoid too many return
statements within this method. Open
return year;
Avoid too many return
statements within this method. Open
if (specificYears.Contains(year)) return year;
Avoid too many return
statements within this method. Open
return CronExpression.Parse(cronExp).GetNextOccurrence(now, timeZone);
Avoid too many return
statements within this method. Open
return nextYear;
Avoid too many return
statements within this method. Open
return View(vm);
Avoid too many return
statements within this method. Open
if (start > year) return start;
Function createParticipantInfo
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private createParticipantInfo(participant: Participant): ParticipantStreams {
const streams: ParticipantStreams = {
consumers: {},
producers: {},
};
- 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 mapFormToDto
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const mapFormToDto: (form: CreatePollDto, myRoomId: string | undefined) => CreatePollDto = (form, myRoomId) => {
const result = {
...form,
instruction: Object.fromEntries(
Object.entries(form.instruction).filter(
- 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 removeReceiveTransport
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public async removeReceiveTransport(connectionId: string): Promise<void> {
const receiver = this.receivers.get(connectionId);
if (receiver) {
this.receivers.delete(connectionId);
- 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 getPollDescription
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const getPollDescription = (instruction: NumericInstruction, t: TFunction<string>) => {
const modifiers = new Array<string>();
if (typeof instruction.min === 'number' && typeof instruction.max === 'number') {
modifiers.push(
- 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"