@@ -74,7 +74,7 @@ private function createImpression($key, $featureFlag, $treatment, $changeNumber,
7474 *
7575 * @return null|mixed
7676 */
77- private function doInputValidationForTreatment ($ key , $ featureFlagName , array $ attributes = null , $ operation )
77+ private function doInputValidationForTreatment ($ key , $ featureFlagName , $ operation , ? array $ attributes = null )
7878 {
7979 $ key = InputValidator::validateKey ($ key , $ operation );
8080 if (is_null ($ key )) {
@@ -112,7 +112,7 @@ private function doEvaluation($operation, $key, $featureFlagName, $attributes)
112112 {
113113 $ default = array ('treatment ' => TreatmentEnum::CONTROL , 'config ' => null );
114114
115- $ inputValidation = $ this ->doInputValidationForTreatment ($ key , $ featureFlagName , $ attributes , $ operation );
115+ $ inputValidation = $ this ->doInputValidationForTreatment ($ key , $ featureFlagName , $ operation , $ attributes );
116116 if (is_null ($ inputValidation )) {
117117 return $ default ;
118118 }
@@ -169,7 +169,7 @@ private function doEvaluation($operation, $key, $featureFlagName, $attributes)
169169 /**
170170 * @inheritdoc
171171 */
172- public function getTreatment ($ key , $ featureName , array $ attributes = null )
172+ public function getTreatment ($ key , $ featureName , ? array $ attributes = null )
173173 {
174174 try {
175175 $ result = $ this ->doEvaluation (
@@ -188,7 +188,7 @@ public function getTreatment($key, $featureName, array $attributes = null)
188188 /**
189189 * @inheritdoc
190190 */
191- public function getTreatmentWithConfig ($ key , $ featureFlagName , array $ attributes = null )
191+ public function getTreatmentWithConfig ($ key , $ featureFlagName , ? array $ attributes = null )
192192 {
193193 try {
194194 return $ this ->doEvaluation (
@@ -213,7 +213,7 @@ public function getTreatmentWithConfig($key, $featureFlagName, array $attributes
213213 *
214214 * @return null|mixed
215215 */
216- private function doInputValidationForTreatments ($ key , $ featureFlagNames , array $ attributes = null , $ operation )
216+ private function doInputValidationForTreatments ($ key , $ featureFlagNames , $ operation , ? array $ attributes = null )
217217 {
218218 $ featureFlags = InputValidator::validateFeatureFlagNames ($ featureFlagNames , $ operation );
219219 if (is_null ($ featureFlags )) {
@@ -264,7 +264,7 @@ private function registerData($impressions, $attributes)
264264 */
265265 private function doEvaluationForTreatments ($ operation , $ key , $ featureFlagNames , $ attributes )
266266 {
267- $ inputValidation = $ this ->doInputValidationForTreatments ($ key , $ featureFlagNames , $ attributes , $ operation );
267+ $ inputValidation = $ this ->doInputValidationForTreatments ($ key , $ featureFlagNames , $ operation , $ attributes );
268268 if (is_null ($ inputValidation )) {
269269 return array ();
270270 }
@@ -301,7 +301,7 @@ private function doEvaluationForTreatments($operation, $key, $featureFlagNames,
301301 /**
302302 * @inheritdoc
303303 */
304- public function getTreatments ($ key , $ featureFlagNames , array $ attributes = null )
304+ public function getTreatments ($ key , $ featureFlagNames , ? array $ attributes = null )
305305 {
306306 try {
307307 return array_map (
@@ -325,7 +325,7 @@ function ($feature) {
325325 /**
326326 * @inheritdoc
327327 */
328- public function getTreatmentsWithConfig ($ key , $ featureFlagNames , array $ attributes = null )
328+ public function getTreatmentsWithConfig ($ key , $ featureFlagNames , ? array $ attributes = null )
329329 {
330330 try {
331331 return $ this ->doEvaluationForTreatments (
@@ -396,7 +396,7 @@ public function track($key, $trafficType, $eventType, $value = null, $properties
396396 return false ;
397397 }
398398
399- public function getTreatmentsByFlagSets ($ key , $ flagSets , array $ attributes = null )
399+ public function getTreatmentsByFlagSets ($ key , $ flagSets , ? array $ attributes = null )
400400 {
401401 try {
402402 return array_map (
@@ -416,7 +416,7 @@ function ($feature) {
416416 }
417417 }
418418
419- public function getTreatmentsWithConfigByFlagSets ($ key , $ flagSets , array $ attributes = null )
419+ public function getTreatmentsWithConfigByFlagSets ($ key , $ flagSets , ? array $ attributes = null )
420420 {
421421 try {
422422 return $ this ->doEvaluationByFlagSets (
@@ -431,7 +431,7 @@ public function getTreatmentsWithConfigByFlagSets($key, $flagSets, array $attrib
431431 }
432432 }
433433
434- public function getTreatmentsByFlagSet ($ key , $ flagSet , array $ attributes = null )
434+ public function getTreatmentsByFlagSet ($ key , $ flagSet , ? array $ attributes = null )
435435 {
436436 try {
437437 return array_map (
@@ -451,7 +451,7 @@ function ($feature) {
451451 }
452452 }
453453
454- public function getTreatmentsWithConfigByFlagSet ($ key , $ flagSet , array $ attributes = null )
454+ public function getTreatmentsWithConfigByFlagSet ($ key , $ flagSet , ? array $ attributes = null )
455455 {
456456 try {
457457 return $ this ->doEvaluationByFlagSets (
@@ -466,7 +466,7 @@ public function getTreatmentsWithConfigByFlagSet($key, $flagSet, array $attribut
466466 }
467467 }
468468
469- private function doInputValidationByFlagSets ($ key , $ flagSets , array $ attributes = null , $ operation )
469+ private function doInputValidationByFlagSets ($ key , $ flagSets , $ operation , ? array $ attributes = null )
470470 {
471471 $ key = InputValidator::validateKey ($ key , $ operation );
472472 if (is_null ($ key ) || !InputValidator::validAttributes ($ attributes , $ operation )) {
@@ -487,7 +487,7 @@ private function doInputValidationByFlagSets($key, $flagSets, array $attributes
487487
488488 private function doEvaluationByFlagSets ($ operation , $ key , $ flagSets , $ attributes )
489489 {
490- $ inputValidation = $ this ->doInputValidationByFlagSets ($ key , $ flagSets , $ attributes , $ operation );
490+ $ inputValidation = $ this ->doInputValidationByFlagSets ($ key , $ flagSets , $ operation , $ attributes );
491491 if (is_null ($ inputValidation )) {
492492 return array ();
493493 }
0 commit comments