diff --git a/src/main/php/websocket/protocol/Opcodes.class.php b/src/main/php/websocket/protocol/Opcodes.class.php index 497fdc4..7ca9870 100755 --- a/src/main/php/websocket/protocol/Opcodes.class.php +++ b/src/main/php/websocket/protocol/Opcodes.class.php @@ -28,6 +28,6 @@ public static function nameOf($opcode) { self::PONG => 'PONG', ]; - return isset($opcodes[$opcode]) ? $opcodes[$opcode] : sprintf('UNKNOWN(0x%02x)', ord($opcode)); + return $opcodes[$opcode] ?? sprintf('UNKNOWN(0x%02x)', ord($opcode)); } } \ No newline at end of file