22namespace LaunchDarkly ;
33
44use LaunchDarkly \Impl \Model \FeatureFlag ;
5+ use LaunchDarkly \LDClient ;
56
67/**
78 * A snapshot of the state of all feature flags with regard to a specific user.
89 *
9- * This is generated by calling {@link \LaunchDarkly\LDClient::allFlagsState()}.
10+ * This is generated by calling {@see \LaunchDarkly\LDClient::allFlagsState()}.
1011 *
1112 * Serializing this object to JSON using json_encode(), or the jsonSerialize() method, will produce the
1213 * appropriate data structure for bootstrapping the LaunchDarkly JavaScript client. See the SDK
@@ -87,11 +88,12 @@ public function getFlagValue(string $key)
8788 }
8889
8990 /**
90- * Returns the evaluation reason for an individual feature flag (as returned by LDClient. variationDetail())
91+ * Returns the evaluation reason for an individual feature flag (as returned by variationDetail())
9192 * at the time the state was recorded.
9293 * @param string $key the feature flag key
9394 * @return EvaluationReason|null the evaluation reason; null if reasons were not recorded, or if there
9495 * was no such flag
96+ * @see \LaunchDarkly\LDClient::variationDetail()
9597 */
9698 public function getFlagReason (string $ key ): ?EvaluationReason
9799 {
@@ -103,9 +105,10 @@ public function getFlagReason(string $key): ?EvaluationReason
103105 }
104106
105107 /**
106- * Returns an associative array of flag keys to flag values. If a flag would have evaluated to the default
107- * value, its value will be null.
108- * <p>
108+ * Returns an associative array of flag keys to flag values.
109+ *
110+ * If a flag would have evaluated to the default value, its value will be null.
111+ *
109112 * Do not use this method if you are passing data to the front end to "bootstrap" the JavaScript client.
110113 * Instead, use jsonSerialize().
111114 * @return array an associative array of flag keys to JSON values
@@ -117,9 +120,10 @@ public function toValuesMap(): array
117120
118121 /**
119122 * Returns a JSON representation of the entire state map (as an associative array), in the format used
120- * by the LaunchDarkly JavaScript SDK. Use this method if you are passing data to the front end in
121- * order to "bootstrap" the JavaScript client.
122- * <p>
123+ * by the LaunchDarkly JavaScript SDK.
124+ *
125+ * Use this method if you are passing data to the front end in order to "bootstrap" the JavaScript client.
126+ *
123127 * Note that calling json_encode() on a FeatureFlagsState object will automatically use the
124128 * jsonSerialize() method.
125129 * @return array an associative array suitable for passing as a JSON object
0 commit comments