Showing 7 of 17 total issues
File globalCss.ts
has 372 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Component, ViewEncapsulation } from '@angular/core';
import { ConfigService } from '../services/configService';
@Component({
selector: 'global-css',
Function ProcessRouteNotification
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected ProcessRouteNotification(currentRoute: ActivatedRoute) {
let url: string = '';
let id: number = 0;
this._breadcrumbNodes = new Array<NavNode>();
Function WebStorage
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export let WebStorage = (service: StorageService, key: string) => {
return (target: Object, propertyName: string): void => {
key = key || propertyName;
let storedValue = service.get(key);
- 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 CollapseNavIfNecessary
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private CollapseNavIfNecessary(event: MouseEvent|any){
if(this._sideMenuExpanded === false) return;
if(event == null) return;
if(event.path == null) 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 HandleCurrentNavHoverChange
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private HandleCurrentNavHoverChange(state: boolean) {
this._sideMenuHovered = state;
if(this._config.PushContentOnCurrentNavHover) {
if(this._sideMenuToggled) this._sideMenuExpanded = true;
else{
- 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 forRoot
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static forRoot(breadcrumb?: BreadcrumbService, hero?: HeroService, notification?: NotificationsService, subscriptions?: SubscriptionService, currentNavProvider?: CurrentNavProvider, configService?: ConfigService, delegateService?: DelegateService): ModuleWithProviders {
return {
ngModule: AppScaffoldModule,
providers: [
breadcrumb ? { provide: BreadcrumbService, useValue: breadcrumb } : BreadcrumbService,
- 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 GetData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected GetData() {
//
// add payload to messages from backend system.
//
- 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"