@@ -168,37 +168,7 @@ private function doEvaluation($operation, $metricName, $key, $featureName, $attr
168168 }
169169
170170 /**
171- * Returns the treatment to show this id for this feature.
172- * The set of treatments for a feature can be configured
173- * on the Split web console.
174- * This method returns the string 'control' if:
175- * <ol>
176- * <li>Any of the parameters were null</li>
177- * <li>There was an exception</li>
178- * <li>The SDK does not know this feature</li>
179- * <li>The feature was deleted through the web console.</li>
180- * </ol>
181- * 'control' is a reserved treatment, to highlight these
182- * exceptional circumstances.
183- *
184- * <p>
185- * The sdk returns the default treatment of this feature if:
186- * <ol>
187- * <li>The feature was killed</li>
188- * <li>The id did not match any of the conditions in the
189- * feature roll-out plan</li>
190- * </ol>
191- * The default treatment of a feature is set on the Split web
192- * console.
193- *
194- * <p>
195- * This method does not throw any exceptions.
196- * It also never returns null.
197- *
198- * @param $key
199- * @param $featureName
200- * @param $attributes
201- * @return string
171+ * @inheritdoc
202172 */
203173 public function getTreatment ($ key , $ featureName , array $ attributes = null )
204174 {
@@ -218,42 +188,7 @@ public function getTreatment($key, $featureName, array $attributes = null)
218188 }
219189
220190 /**
221- * Returns an object with the treatment to show this id for this feature
222- * and the config provided.
223- * The set of treatments and config for a feature can be configured
224- * on the Split web console.
225- * This method returns the string 'control' if:
226- * <ol>
227- * <li>Any of the parameters were null</li>
228- * <li>There was an exception</li>
229- * <li>The SDK does not know this feature</li>
230- * <li>The feature was deleted through the web console.</li>
231- * </ol>
232- * 'control' is a reserved treatment, to highlight these
233- * exceptional circumstances.
234- *
235- * <p>
236- * The sdk returns the default treatment of this feature if:
237- * <ol>
238- * <li>The feature was killed</li>
239- * <li>The id did not match any of the conditions in the
240- * feature roll-out plan</li>
241- * </ol>
242- * The default treatment of a feature is set on the Split web
243- * console.
244- *
245- * <p>
246- * This method does not throw any exceptions.
247- * It also never returns null.
248- *
249- * This method returns null configuration if:
250- * <ol>
251- * <li>config was not set up</li>
252- * </ol>
253- * @param $key
254- * @param $featureName
255- * @param $attributes
256- * @return string
191+ * @inheritdoc
257192 */
258193 public function getTreatmentWithConfig ($ key , $ featureName , array $ attributes = null )
259194 {
@@ -388,35 +323,7 @@ private function doEvaluationForTreatments($operation, $metricName, $key, $featu
388323 }
389324
390325 /**
391- * Returns an associative array which each key will be
392- * the treatment result for each feature passed as parameter.
393- * The set of treatments for a feature can be configured
394- * on the Split web console.
395- * This method returns the string 'control' if:
396- * <ol>
397- * <li>featureNames is invalid/li>
398- * </ol>
399- * 'control' is a reserved treatment, to highlight these
400- * exceptional circumstances.
401- *
402- * <p>
403- * The sdk returns the default treatment of this feature if:
404- * <ol>
405- * <li>The feature was killed</li>
406- * <li>The id did not match any of the conditions in the
407- * feature roll-out plan</li>
408- * </ol>
409- * The default treatment of a feature is set on the Split web
410- * console.
411- *
412- * <p>
413- * This method does not throw any exceptions.
414- * It also never returns null.
415- *
416- * @param $key
417- * @param $featureNames
418- * @param $attributes
419- * @return array|control
326+ * @inheritdoc
420327 */
421328 public function getTreatments ($ key , $ featureNames , array $ attributes = null )
422329 {
@@ -434,44 +341,14 @@ function ($feature) {
434341 )
435342 );
436343 } catch (\Exception $ e ) {
437- SplitApp::logger ()->critical ('getTreatmens method is throwing exceptions ' );
344+ SplitApp::logger ()->critical ('getTreatments method is throwing exceptions ' );
438345 $ splitNames = InputValidator::validateFeatureNames ($ featureNames , 'getTreatments ' );
439346 return is_null ($ splitNames ) ? array () : array_fill_keys ($ splitNames , TreatmentEnum::CONTROL );
440347 }
441348 }
442349
443350 /**
444- * Returns an associative array which each key will be
445- * the treatment result and the config for each
446- * feature passed as parameter.
447- * The set of treatments for a feature can be configured
448- * on the Split web console and the config for
449- * that treatment.
450- * This method returns the string 'control' if:
451- * <ol>
452- * <li>featureNames is invalid/li>
453- * </ol>
454- * 'control' is a reserved treatment, to highlight these
455- * exceptional circumstances.
456- *
457- * <p>
458- * The sdk returns the default treatment of this feature if:
459- * <ol>
460- * <li>The feature was killed</li>
461- * <li>The id did not match any of the conditions in the
462- * feature roll-out plan</li>
463- * </ol>
464- * The default treatment of a feature is set on the Split web
465- * console.
466- *
467- * <p>
468- * This method does not throw any exceptions.
469- * It also never returns null.
470- *
471- * @param $key
472- * @param $featureNames
473- * @param $attributes
474- * @return array|control
351+ * @inheritdoc
475352 */
476353 public function getTreatmentsWithConfig ($ key , $ featureNames , array $ attributes = null )
477354 {
@@ -492,18 +369,7 @@ public function getTreatmentsWithConfig($key, $featureNames, array $attributes =
492369 }
493370
494371 /**
495- * A short-hand for
496- * <pre>
497- * (getTreatment(key, feature) == treatment) ? true : false;
498- * </pre>
499- *
500- * This method never throws exceptions.
501- * Instead of throwing exceptions, it returns false.
502- *
503- * @param $key
504- * @param $featureName
505- * @param $treatment
506- * @return bool
372+ * @inheritdoc
507373 */
508374 public function isTreatment ($ key , $ featureName , $ treatment )
509375 {
0 commit comments