Segment::validate PHP Метод

validate() публичный статический Метод

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