@@ -61,6 +61,8 @@ class EventBuilder
6161 * @param $config ProjectConfig Configuration for the project.
6262 * @param $userId string ID of user.
6363 * @param $attributes array Attributes of the user.
64+ *
65+ * @return array Hash representing parameters which are common to both impression and conversion events.
6466 */
6567 private function getCommonParams ($ config , $ userId , $ attributes )
6668 {
@@ -89,14 +91,12 @@ private function getCommonParams($config, $userId, $attributes)
8991 if (!is_null ($ attributeValue )) {
9092 // check for reserved attributes
9193 if (strcmp ($ attributeKey , RESERVED_ATTRIBUTE_KEY_BUCKETING_ID ) == 0 ) {
92- // TODO (Alda): the type for bucketing ID attribute may change so that custom
93- // attributes are not overloaded
9494 $ feature = [
95- ENTITY_ID => RESERVED_ATTRIBUTE_KEY_BUCKETING_ID ,
96- KEY => RESERVED_ATTRIBUTE_KEY_BUCKETING_ID_EVENT_PARAM_KEY ,
97- TYPE => CUSTOM_ATTRIBUTE_FEATURE_TYPE ,
98- VALUE => $ attributeValue
99- ];
95+ ENTITY_ID => RESERVED_ATTRIBUTE_KEY_BUCKETING_ID ,
96+ KEY => RESERVED_ATTRIBUTE_KEY_BUCKETING_ID_EVENT_PARAM_KEY ,
97+ TYPE => CUSTOM_ATTRIBUTE_FEATURE_TYPE ,
98+ VALUE => $ attributeValue
99+ ];
100100
101101 } else {
102102 $ attributeEntity = $ config ->getAttribute ($ attributeKey );
@@ -122,7 +122,9 @@ private function getCommonParams($config, $userId, $attributes)
122122 * Helper function to get parameters specific to impression event.
123123 *
124124 * @param $experiment Experiment Experiment being activated.
125- * @param $variationId string
125+ * @param $variationId String ID representing the variation for the user.
126+ *
127+ * @return array Hash representing parameters particular to impression event.
126128 */
127129 private function getImpressionParams (Experiment $ experiment , $ variationId )
128130 {
@@ -156,6 +158,8 @@ private function getImpressionParams(Experiment $experiment, $variationId)
156158 * @param $eventKey string Key representing the event.
157159 * @param $experimentVariationMap array Map of experiment ID to the ID of the variation that the user is bucketed into.
158160 * @param $eventTags array Hash representing metadata associated with the event.
161+ *
162+ * @return array Hash representing parameters particular to conversion event.
159163 */
160164 private function getConversionParams ($ config , $ eventKey , $ experimentVariationMap , $ eventTags )
161165 {
0 commit comments