Showing 272 of 791 total issues
Avoid too many return
statements within this function. Open
return new ContentRef([[this._renderer.createText(`${content}`)]]);
Avoid too many return
statements within this function. Open
return result + 'měsíci';
Avoid too many return
statements within this function. Open
return 'रात';
Avoid too many return
statements within this function. Open
return '晚上';
Avoid too many return
statements within this function. Open
return result + (plural(num) ? 'měsíce' : 'měsíců');
Avoid too many return
statements within this function. Open
return null;
Avoid too many return
statements within this function. Open
return result;
Avoid too many return
statements within this function. Open
return result + (plural(num) ? 'dny' : 'dní');
Avoid too many return
statements within this function. Open
return result + 'lety';
Function isShown
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
set isShown(value: boolean) {
this._isShown = value;
if (value) {
this.renderer.addClass(
this.element.nativeElement,
- 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 configFromString
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function configFromString(config: DateParsingConfig): DateParsingConfig {
if (!isString(config._i)) {
return config;
}
- 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 show
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
show(): void {
this.dismissReason = null;
this.onShow.emit(this);
if (this._isShown) {
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 getSetGlobalLocale
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function getSetGlobalLocale(key?: string | string[], values?: LocaleData): string {
let data: Locale;
if (key) {
if (isUndefined(values)) {
- 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 compareDateDisabled
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected compareDateDisabled(
date1Disabled: { date: Date; mode: string },
date2: Date
): number {
if (date1Disabled === undefined || date2 === undefined) {
- 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 _showBackdrop
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_showBackdrop(): void {
const isBackdropEnabled =
this.config.backdrop || this.config.backdrop === 'static';
const isBackdropInDOM =
!this.backdropRef || !this.backdropRef.instance.isShown;
- 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 compare
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
compare(date1: Date, date2: Date): number | undefined {
if (date1 === undefined || date2 === undefined) {
return undefined;
}
- 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 _renderTime
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private _renderTime(value: string | Date): void {
if (!isValidDate(value)) {
this.hours = '';
this.minutes = '';
this.seconds = '';
- 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 validate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
validate(c: AbstractControl): ValidationErrors | null {
const _value: [Date, Date] = c.value;
if (_value === null || _value === undefined || !isArray(_value)) {
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 isDisabled
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected isDisabled(date: Date): boolean {
let isDateDisabled = false;
if (this.dateDisabled) {
this.dateDisabled.forEach(
(disabledDate: { date: Date; mode: 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 plural
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function plural(word, num) {
let forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
}
- 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"