lib/Segment.php
public static function validate($msg, $type){
    $userId = !empty($msg["userId"]);
    $anonId = !empty($msg["anonymousId"]);
    self::assert($userId || $anonId, "Segment::${type}() requires userId or anonymousId");
  }
public static function validate($msg, $type){
    $userId = !empty($msg["userId"]);
    $anonId = !empty($msg["anonymousId"]);
    self::assert($userId || $anonId, "Segment::${type}() requires userId or anonymousId");
  }
public static function validate ( $ msg , $ type ) { $ userId = ! empty ( $ msg [ "userId" ] ) ; $ anonId = ! empty ( $ msg [ "anonymousId" ] ) ; self :: assert ( $ userId || $ anonId , "Segment::${type}() requires userId or anonymousId" ) ; }
Validate common properties.

@param array $msg
@param string $type
Validate common properties .