| @@ 40-72 (lines=33) @@ | ||
| 37 | * |
|
| 38 | * @return Builder |
|
| 39 | */ |
|
| 40 | public static function confirmationEvent( |
|
| 41 | $sequenceId, |
|
| 42 | $userId, |
|
| 43 | $timestamp = null, |
|
| 44 | $isEmailConfirmed = null, |
|
| 45 | $idPhoneConfirmed = null, |
|
| 46 | $email = null, |
|
| 47 | $phone = null |
|
| 48 | ) { |
|
| 49 | $builder = new self('confirmation', $sequenceId); |
|
| 50 | if ($timestamp === null) { |
|
| 51 | $timestamp = time(); |
|
| 52 | } |
|
| 53 | ||
| 54 | return $builder->addUserData( |
|
| 55 | $email, |
|
| 56 | $userId, |
|
| 57 | $phone, |
|
| 58 | null, |
|
| 59 | null, |
|
| 60 | null, |
|
| 61 | null, |
|
| 62 | null, |
|
| 63 | null, |
|
| 64 | null, |
|
| 65 | null, |
|
| 66 | null, |
|
| 67 | $timestamp, |
|
| 68 | $isEmailConfirmed, |
|
| 69 | $idPhoneConfirmed, |
|
| 70 | null |
|
| 71 | ); |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * Returns builder for login event |
|
| @@ 86-117 (lines=32) @@ | ||
| 83 | * |
|
| 84 | * @return Builder |
|
| 85 | */ |
|
| 86 | public static function loginEvent( |
|
| 87 | $sequenceId, |
|
| 88 | $userId, |
|
| 89 | $timestamp = null, |
|
| 90 | $email = null, |
|
| 91 | $failed = null, |
|
| 92 | $gender = null |
|
| 93 | ) { |
|
| 94 | $builder = new self('login', $sequenceId); |
|
| 95 | if ($timestamp === null) { |
|
| 96 | $timestamp = time(); |
|
| 97 | } |
|
| 98 | ||
| 99 | return $builder->addUserData( |
|
| 100 | $email, |
|
| 101 | $userId, |
|
| 102 | null, |
|
| 103 | null, |
|
| 104 | null, |
|
| 105 | null, |
|
| 106 | $gender, |
|
| 107 | null, |
|
| 108 | null, |
|
| 109 | null, |
|
| 110 | null, |
|
| 111 | $timestamp, |
|
| 112 | null, |
|
| 113 | null, |
|
| 114 | null, |
|
| 115 | $failed |
|
| 116 | ); |
|
| 117 | } |
|
| 118 | ||
| 119 | /** |
|
| 120 | * Returns builder for registration event |
|