original_string: public static function getSocketType(string $packet)
      {
          $type = $packet[0] ?? null;
  
          if (! array_key_exists($type, static::$socketTypes)) {
              return null;
          }
  
          return (int) $type;
      }
code: public static function getSocketType(string $packet)
      {
          $type = $packet[0] ?? null;
  
          if (! array_key_exists($type, static::$socketTypes)) {
              return null;
          }
  
          return (int) $type;
      }
code_tokens: public static function getSocketType ( string $ packet ) { $ type = $ packet [ 0 ] ?? null ; if ( ! array_key_exists ( $ type , static :: $ socketTypes ) ) { return null ; } return ( int ) $ type ; }
docstring: Get socket packet type of a raw payload.
  
  @param string $packet
  
  @return int|null
docstring_tokens: Get socket packet type of a raw payload .