Skip to content

Commit

Permalink
Fix Sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bassages committed Feb 4, 2021
1 parent 1d731ff commit 0ebeab7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/app/date-navigator/date-navigator.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, EventEmitter, Input, OnInit, Output, QueryList, ViewChild, ViewChildren} from '@angular/core';
import {Component, EventEmitter, Input, Output, QueryList, ViewChildren} from '@angular/core';
import * as moment from 'moment';
import {Moment} from 'moment';
import {DatePickerDirective, IDatePickerDirectiveConfig} from 'ng2-date-picker';
Expand Down
4 changes: 2 additions & 2 deletions src/app/energie-verbruik/energie-verbruik.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export class EnergieVerbruikComponent implements OnInit {

public ngOnInit() {
combineLatest([ this.activatedRoute.paramMap, this.activatedRoute.queryParamMap ]).subscribe(combined => {
const params: ParamMap = <ParamMap>combined[0];
const queryParams: ParamMap = <ParamMap>combined[1];
const params: ParamMap = combined[0];
const queryParams: ParamMap = combined[1];

const verbruiksoortParam = params.get('verbruiksoort');
const periodeParam = params.get('periode');
Expand Down
2 changes: 1 addition & 1 deletion src/app/error-handling/error-handing.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class ErrorHandingService {
return this.errorSubject.asObservable();
}

public handleError(message: String, causedBy: any) {
public handleError(message: string, causedBy: any) {
console.error(message, causedBy);
this.spinnerService.hide();
this.errorSubject.next(new Error(message, causedBy));
Expand Down
4 changes: 2 additions & 2 deletions src/app/error-handling/error-handling.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class ErrorHandlingComponent implements OnInit {
@ViewChild('errorDialogTemplate', { static: true })
private readonly errorDialogTemplate: TemplateRef<any>;

public message: String;
public message: string;
private modal: NgbModalRef;

constructor(private readonly modalService: NgbModal,
Expand All @@ -25,7 +25,7 @@ export class ErrorHandlingComponent implements OnInit {
}

public handleError(error: Error): void {
this.message = error.message;
this.message = error.message.valueOf();
this.openDialog();
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/error-handling/error.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export class Error {

constructor(public message: String, public causedBy: any) {
constructor(public message: string, public causedBy: any) {
}
}

0 comments on commit 0ebeab7

Please sign in to comment.