From: Jérôme Benoit Date: Sat, 20 Jan 2024 18:55:54 +0000 (+0100) Subject: refactor: use the same empty function everywhere X-Git-Tag: v1.2.33~46 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=fc5529dbb7b16fcbc7fad7880c3412cf11afa64d;p=e-mobility-charging-stations-simulator.git refactor: use the same empty function everywhere Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/OCPPResponseService.ts b/src/charging-station/ocpp/OCPPResponseService.ts index 738aa5ae..20cfab6e 100644 --- a/src/charging-station/ocpp/OCPPResponseService.ts +++ b/src/charging-station/ocpp/OCPPResponseService.ts @@ -10,7 +10,7 @@ import type { OCPPVersion, RequestCommand } from '../../types/index.js' -import { logger } from '../../utils/index.js' +import { Constants, logger } from '../../utils/index.js' type Ajv = _Ajv.default // eslint-disable-next-line @typescript-eslint/no-redeclare const Ajv = _Ajv.default @@ -96,9 +96,7 @@ export abstract class OCPPResponseService { ) } - protected emptyResponseHandler (): void { - /* This is intentional */ - } + protected emptyResponseHandler = Constants.EMPTY_FUNCTION private getJsonRequestValidateFunction( commandName: RequestCommand,