Showing 451 of 1,081 total issues
Function useBackgroundFile
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function useBackgroundFile({file, motifArea, containerDimension, effects}) {
if (!file) {
return null ;
}
- 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 selfClear
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function selfClear(items, index) {
const item = items[index];
const next = items[index + 1];
if (supportsWrappingAroundFloats(item) ||
- 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 FitViewport
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function FitViewport({file, aspectRatio, opaque, children, fill, scale = 1}) {
const {height} = useFullscreenDimensions();
if (!file && !aspectRatio) return children;
- 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 heightMode
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function heightMode(section) {
if (section.fullHeight) {
if ((section.transition.startsWith('fade') && section.previousSection) ||
(section.nextSection && section.nextSection.transition.startsWith('fade'))) {
return 'fullFade';
- 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 VideoPlayer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function VideoPlayer({videoFile, posterImageFile, ...props}) {
const [activeQuality] = useVideoQualitySetting();
const textTracks = useTextTracks({
file: videoFile,
defaultTextTrackFilePermaId: props.defaultTextTrackFilePermaId,
- 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 translateStatus
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
translateStatus: function(xhr) {
if (xhr.status === 401) {
return 'Sie müssen angemeldet sein, um diese Aktion auszuführen.';
}
else if (xhr.status === 403) {
- 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 initialize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
initialize: function() {
this.listenTo(this, 'change:main', function(model, value) {
if (value) {
this.each(function(storyline) {
if (storyline.isMain() && storyline !== model) {
- 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
Method get_details
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_details(job_id)
with_exception_translation do
response = Zencoder::Job.details(job_id)
if response.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
Method make
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def make
source = @file
filename = [@basename, '.webp'].join
destination = Paperclip::TempfileFactory.new.generate(filename)
- 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 comparator
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
comparator: function(pageA, pageB) {
if (pageA.storylinePosition() > pageB.storylinePosition()) {
return 1;
}
else if (pageA.storylinePosition() < pageB.storylinePosition()) {
- 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 update
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
update: function() {
if (this.model) {
var stage = this.model.currentStage();
if (stage) {
- 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
Method all
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def all
initial_widgets = placeholders_by_role.merge(defaults_by_role)
initial_widgets.merge(from_db_by_role) { |_role_key, old_val, new_val|
if old_val.configuration.present?
new_val.configuration = {} if new_val.configuration.nil?
- 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 cueSettingsMethods
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const cueSettingsMethods = function(player) {
/**
* Specify the display position of text tracks. This method can also
* be used to make VideoJS reposition the text tracks after the
* margins of the text track display have been changed (e.g. to
- 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
Method poll_zencoder
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def poll_zencoder(file, api)
info = api.get_info(file.job_id)
file.encoding_progress = info[:finished] ? 100 : info[:progress];
file.encoding_error_message = nil
- 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 filterSources
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const filterSources = function(playerElement) {
if (playerElement.tagName.toLowerCase() !== 'video') {
return playerElement;
}
- 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
Avoid too many return
statements within this function. Open
return state;
Avoid too many return
statements within this function. Open
return {
...state,
startPoints: null,
selection: {
...state.selection,
Avoid too many return
statements within this function. Open
return {
...state,
points,
potentialPoint: null,
indicatorPosition: ensureInPolygon(points, state.indicatorPosition),
Avoid too many return
statements within this function. Open
return updatePoints(
state,
state.selection.index,
ensureInBounds(action.position),
action.position
Avoid too many return
statements within this function. Open
return {
...state,
potentialPointInsertIndex: index,
potentialPoint
};