Showing 50 of 396 total issues
Function ngAfterContentInit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public ngAfterContentInit() {
if (this._infoBox != null) { this._infoBox.HostMarker = this; }
if (this._containerRef.element.nativeElement.parentElement) {
const parentName: string = this._containerRef.element.nativeElement.parentElement.tagName;
if (parentName.toLowerCase() === 'x-cluster-layer') {
- 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 LoadModuleInstance
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public LoadModuleInstance(moduleName: string, useSharedInstance: boolean = true): Promise<Object> {
const s: string = moduleName.substr(moduleName.lastIndexOf('.') + 1);
if (this._modules.has(moduleName)) {
let o: any = null;
if (!useSharedInstance) {
- 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 AddLayer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public AddLayer(layer: ClusterLayerDirective): void {
const options: IClusterOptions = {
id: layer.Id,
visible: layer.Visible,
clusteringEnabled: layer.ClusteringEnabled,
- 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 OnSpiderMouseOver
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private OnSpiderMouseOver(e: Microsoft.Maps.IMouseEventArgs): void {
const pin: Microsoft.Maps.Pushpin = <Microsoft.Maps.Pushpin>e.primitive;
if (pin instanceof Microsoft.Maps.Pushpin && pin.metadata && pin.metadata.isClusterMarker) {
const m: BingSpiderClusterMarker = this.GetSpiderMarkerFromBingMarker(pin);
m.Stick.setOptions(this._spiderOptions.stickHoverStyle);
- 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 CreateDynamicCircleMarker
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected static CreateDynamicCircleMarker(iconInfo: IMarkerIconInfo): string {
if (document == null) { throw Error('Document context (window.document) is required for dynamic circle markers.'); }
if (iconInfo == null || iconInfo.size == null) { throw Error('IMarkerIconInfo.size is required for dynamic circle markers.'); }
if (iconInfo.id != null && Marker.MarkerCache.has(iconInfo.id)) {
const mi: IMarkerIconCacheEntry = Marker.MarkerCache.get(iconInfo.id);
- 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 SetVisible
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public SetVisible(visible: boolean): void {
const map: GoogleMapTypes.GoogleMap = visible ? this._layer.getMap() : null;
if (!visible) {
this._layer.resetViewport(true);
}
- 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 GetVisible
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected GetVisible() {
const minZoom: number = this.Get('minZoom');
const maxZoom: number = this.Get('maxZoom');
const hidden: boolean = this.Get('hidden');
- 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 GetPixelsFromClick
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public GetPixelsFromClick(e: MouseEvent | any): IPoint {
if (!e || !e.latLng || !e.latLng.lat || !e.latLng.lng) {
return null;
}
if (this._mapService.MapInstance == 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 TranslatePaths
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static TranslatePaths(paths: Array<ILatLong> | Array<Array<ILatLong>>): Array<Array<GoogleMapTypes.LatLng>> {
const p: Array<Array<GoogleMapTypes.LatLng>> = new Array<Array<GoogleMapTypes.LatLng>>();
if (paths == null || !Array.isArray(paths) || paths.length === 0) {
p.push(new Array<GoogleMapTypes.LatLng>());
}
- 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 CreateMarker
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public CreateMarker(layer: number, options: IMarkerOptions): Promise<Marker> {
const payload = (icon: string, l: Layer): BingMarker => {
const loc: Microsoft.Maps.Location = BingConversions.TranslateLocation(options.position);
const o: Microsoft.Maps.IPushpinOptions = BingConversions.TranslateMarkerOptions(options);
if (icon && icon !== '') { o.icon = icon; }
- 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"