<?php ! isset($event['requestContext']['domainName']) ||
! isset($event['requestContext']['apiId']) ||
! isset($event['requestContext']['stage']) ||
! in_array(
$event['requestContext']['eventType'],
[
'CONNECT',
'DISCONNECT',
'MESSAGE',
],
true
)
) {
throw new InvalidLambdaEvent('Websocket', $event);
}