Showing 392 of 1,004 total issues
Avoid too many return
statements within this function. Open
return Promise.resolve('fulfilled');
Avoid too many return
statements within this function. Open
return 'Der Server hat einen internen Fehler gemeldet.';
Avoid too many return
statements within this function. Open
return 1;
Avoid too many return
statements within this function. Open
return Promise.resolve('failed');
Avoid too many return
statements within this function. Open
return '';
Avoid too many return
statements within this function. Open
return result;
Avoid too many return
statements within this function. Open
return -1;
Avoid too many return
statements within this function. Open
return [
{
type: 'video/mp4',
src: videoFile.urls[quality]
}
Avoid too many return
statements within this function. Open
return 0;
Avoid too many return
statements within this function. Open
return 'Der Server ist nicht erreichbar.';
Function default
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function(collectionName, {namespace} = {}) {
return function itemsSelector(state) {
if (namespace) {
if (!state[namespace]) {
throw new Error(`Cannot select from unknown namespace ${namespace}.`);
- 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 HashAdapter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const HashAdapter = function() {
var counter = 0;
this.back = function() {
if (counter > 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 autoTextTrackFile
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function autoTextTrackFile(textTrackFiles, defaultTextTrackFileId, locale, volume) {
if (defaultTextTrackFileId) {
const defaultTextTrackFile = textTrackFiles.find(textTrackFile =>
textTrackFile.permaId == defaultTextTrackFileId
);
- 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 IframeEmbed
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function IframeEmbed({configuration}) {
const {shouldLoad} = useContentElementLifecycle();
const {isEditable, isSelected} = useContentElementEditorState();
const portraitOrientation = usePortraitOrientation();
- 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 withLineBreakNormalization
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function withLineBreakNormalization(editor) {
const { normalizeNode } = editor;
editor.normalizeNode = ([node, path]) => {
if (node.text) {
- 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 MediaPlayerControls
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function MediaPlayerControls(props) {
const playerState = props.playerState;
const playerActions = props.playerActions;
const {t} = useI18n();
- 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 default
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function({
tagName,
sources,
poster = () => {},
emulateTextTracksDisplay = 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 resume
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
resume: function() {
if (this.multiPlayer.paused()) {
if (this.disabled || this.backgroundMedia.muted) {
return new $.Deferred().resolve().promise();
}
- 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 getAttributesFromBackdropAttribute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getAttributesFromBackdropAttribute() {
const backdrop = this.attributes.backdrop || {};
if (backdrop.image && backdrop.image.toString().startsWith('#')) {
return {
- 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 motifAreaDisabled
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function motifAreaDisabled([
backdropType,
backdropImageMotifArea, backdropImageMobileMotifArea, backdropVideoMotifArea,
backdropImage, backdropImageMobile, backdropVideo
]) {
- 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"